PetHubLocal / pethublocal

Replacement for SurePetCare "Connect" cloud service connecting via MQTT to Home Assistant
MIT License
70 stars 9 forks source link

Switching an already enabled KeepIn again to "on" leads to switch it off #13

Open jacotec opened 2 years ago

jacotec commented 2 years ago

I found an issue with can lead to escaping cats apart from allowed times:

An HA automation sets the switch "Keepin" of our gate flap 90 mins before sunset. Yesterday we found the Keepin unlocked at 21:00 when it was already quite dark.

A look info the logs showed that the Keepin was unlocked at the same time as my automation has triggered.

I can reproduce it: With the Keepin locked, triggering the automation which also sets the Keepin to "on", leads to Keepin changing to "off".

I've added a condition to my automation, so the action is performed only when Keepin is "off", but the basic behavior is not correct this way.

I guess it might be the same with "Keepout" ...