HASmartThermostat icon indicating copy to clipboard operation
HASmartThermostat copied to clipboard

Need to detect if switch failed to change state

Open edgimar opened this issue 1 year ago • 5 comments

Describe the bug It appears that if a switch doesn't provide feedback about it's current state (e.g. maybe it's a template defined switch), and if the switch for some reason doesn't end up in the desired state, smart thermostat isn't able to detect this and try to correct it (e.g by toggling the switch state).

I've attached a screenshot that illustrates this scenario having occurred.

Screenshots Screenshot_20230226-084813_1

edgimar avatar Feb 26 '23 14:02 edgimar

I have exactly the same issues and i thought that i messed something up.

Andrzej21372137 avatar Feb 26 '23 17:02 Andrzej21372137

Is your configuration using the keep_alive parameter ? His role is to regularly check the state of the switch is aligned with the thermostat.

ScratMan avatar Feb 26 '23 17:02 ScratMan

Yes i have it set to 60 sec.

Andrzej21372137 avatar Feb 27 '23 02:02 Andrzej21372137

Is your configuration using the keep_alive parameter ? His role is to regularly check the state of the switch is aligned with the thermostat.

Hi, I know it's unrelated to this issue, but this is the first time I've seen the keep_alive parameter being succinctly explained. The README says that:

keep_alive (Required): sets update interval for the PWM pulse width. If interval is too big, the PWM granularity will be reduced, leading to lower accuracy of temperature control, can be float in seconds, or time hh:mm:ss.

zarebski-m avatar Feb 27 '23 22:02 zarebski-m

I also have the keep_alive parameter set to 60 seconds, but I believe this issue is not addressed by that parameter (as it currently behaves). Based on the description, it influences the frequency that the PWM output value is updated, but I wonder what happens if the computed output does not differ from the previous output. In this case, is a command issued to the switch telling it to be in a particular state? If not, then this could explain the screenshot I included (assuming that there was one time that a "turn on" command wasn't correctly received/processed by the switch, and the PWM state after that time was only ever "on").

edgimar avatar Mar 04 '23 15:03 edgimar