zacs / ha-dualmodegeneric

Generic thermostat capable of heating and cooling
68 stars 26 forks source link

[Feature Request] support running multiple elements concurrently #28

Open mjsambol opened 3 years ago

mjsambol commented 3 years ago

Some HVAC systems require that circuits be controlled independently for fan, compressor, heat pump, etc. The fan may be turned on and off together with the compressor, or the fan may run continuously, independently of the compressor's activation and deactivation. There are merits to each of these, see for example

I wished to have both options, and use the "cool" mode for continuous fan / periodic compressor, and "dryer" mode for synchronized fan + compressor. This matches the behavior of a thermostat I used previously.

Using the ha-dualmodegeneric component to implement fan+compressor together was straightforward, but I had difficulty implementing continuous fan + periodic compressor. The reason is that the code in _async_control_heating prevents mode activation while a different mode is active.

I was able to work around this (see issue 27) by obscuring the fan controller behind a template switch. For the benefit of future users, I suggest either mentioning this in the documentation or offering a configuration option which would change the behavior of _async_control_heating so that the fan being in operation would not prevent other modes from being activated concurrently.

This seems to also be related to FR 11

zacs commented 3 years ago

I agree this sort of behavior is ideal in HVAC systems, but it seems like a great deal of complexity. Would it work for you to solve each situation like so?

That may cause some problems if you turn on the dryer but then manually turn off the fan, etc, but it seems like the simplest way to do what you want.

mjsambol commented 3 years ago

Yes, I've solved the issue for myself, but it's a bit involved. I opened the FR for the benefit of future users:

For the benefit of future users, I suggest either mentioning this in the documentation or offering a configuration option which would change the behavior of _async_control_heating so that the fan being in operation would not prevent other modes from being activated concurrently.