jmcollin78 / versatile_thermostat

A full featured Thermostat for Home Assistant: presets, window, motion, presence and overpowering management
MIT License
327 stars 34 forks source link

Make the switch keep-alive callback conditional on the entity state #382

Closed pdcastro closed 9 months ago

pdcastro commented 9 months ago

This PR is motivated by discussion #379. It is not clear that it fixes any bug, because we have not identified a bug: We have not been able to reproduce the issue reported by the user. All my tests — both automated unit tests and manual end-to-end tests — behaved the same way before and after this PR.

Having said that, the added logic in this PR fends off against some theoretical speculation of what might happen in some corner cases. See other comments for more details.