999LV / SmartVirtualThermostat

Smart Virtual Thermostat python plugin for Domoticz home automation system
MIT License
42 stars 31 forks source link

Minimal heat applied at negative power calculation #59

Open jakenl opened 2 years ago

jakenl commented 2 years ago

While the plugin setting "minimum heating cycle" is set to "only when heat is required", there is in some cases still heat applied while the power calculation <= 0 This happens when the temperature is between setpoint and deltamax (overshoot = false).

My proposal is to change to following line:

apply minimum power as required

    if power <= self.minheatpower and (Parameters["Mode4"] == "Forced" or not overshoot):

to:

    # apply minimum power as required
    if power > 0 and power <= self.minheatpower and (Parameters["Mode4"] == "Forced" or not overshoot):