EDIT: I allowed myself to slightly change the title to emphasize OpenStudio. Also edited my initial answer in response to your comment below. If you search UMH, as well as OpenStudio and EnergyPlus GitHub issues, the approach appears something of a hot potato. I'll leave it at that, and try to stay on point.
Option A
thermal_zone.setUseIdealAirLoads(true)
... instructs OpenStudio to generate a HVACTemplate:Zone:IdealLoadsAirSystem object during forward translation. There are possibly other objects OpenStudio adds in the process, like OutputVariables - not sure.
One can always edit HVACTemplate:Zone:IdealLoadsAirSystem objects in the generated run/in.idf file, but heat recovery settings aren't (yet) available before ExpandObjects is finally executed. So in a nutshell, I don't believe it possible to edit ideal loads air system heat recovery settings using this approach with OpenStudio.
It's worth running energyplus -x in.idf
and checking the generated eplusout.expidf file. As detailed in the EnergyPlus IO Reference, the HVACTemplate:Zone:IdealLoadsAirSystem objects are commented out, while the file inherits new (expanded) IDF objects (search for "New objects created from ExpandObjects") including ZoneHVAC:IdealLoadsAirSystem, allowing one to edit heat recovery settings! It's worth noting what ExpandedObjects ended up adding ...
Option B
As an alternative, one can skip the HVACTemplate option altogether, and instead directly add an ideal loads air system to each thermal zone - a nice demo here (Line 27):
ideal_loads = OpenStudio::Model::ZoneHVACIdealLoadsAirSystem.new(model)
ideal_loads.addToThermalZone(thermal_zone)
ideal_loads.setHeatRecoveryType("Sensible")
ideal_loads.setSensibleHeatRecoveryEffectiveness(0.7)
One can edit other variables. One can always look up other bare bones minimum model requirements, such as space/spacetype inputs (Line 469), thermostats (Line 620), etc. - I find OpenStudio Resources very handy!
More steps, yet more options to fine-tune. Preferred approach going forward, I think.
Hope this is clearer. There are certainly more experienced users with OpenStudio vs HVAC templates + ExpandObjects - maybe they can chime in.