ScratMan / HASmartThermostat

Smart Thermostat with PID controller for HomeAssistant
353 stars 50 forks source link

Turning off the "operation" on the thermostat does not turn off related heater switch #34

Closed jandado closed 2 years ago

jandado commented 2 years ago

First of all, thank you for an excellent integration. I still have some tweaking of the parameters to do, but I love the idea and appreciate the work you have done so far.

Describe the bug Turning the operation of the smart thermostat to "off" does not turn off configured heater switch immediately - I am not sure if it is waiting for temperature change, min_cycle_duration, or pwm period. In fact, it appears it does not attempt to switch it off at all.

To Reproduce Steps to reproduce the behavior: Wait for the thermostat to turn heating on, set operation to "off". Switch is not turned off immediately.

Expected behavior I expect the configured heater switch to turn off immediately.

Additional context Why I need it to turn off immediately: In my setup I have z-wave relays that are "lost" when they lose power - this happens several times a day because the utility company remotely switches off heating circuits during predefined times of peak demand. I get cheaper electricity as a result. If there are attempts to communicate with these relays during this time they get marked dead by the z-wave controller.

To prevent this from happening I turn the thermostat off preemptively using a script and predefined schedule - this makes sure the thermostat is not attempting to turn it on. I turn the thermostat back to operation mode "heat" once power is detected on related circuits.

I have been doing this for over a year using the core "generic thermostat" and have switched this week to smart thermostat and noticed this behavior. At worst I will modify my scripts to turn off the thermostats and related switches "manually".

ScratMan commented 2 years ago

Hi, checked on my side, confirmed the min_cycle_duration can lock the heater in ON state, and as the thermostat is off, the heater state will never refresh. It will be fixed in next release.

ScratMan commented 2 years ago

Closed by v2021.12.1