I have a sensor.alarm_arm_status entity which comes from the Konnected integration but sometimes I might need to restart HA when the alarm is armed and when it comes back online it looses the state and shows off as disarmed.
I was searching for info on this same problem. Restarting HA causes the Open sensor to revert to Closed state, even though the Konnected status is Open. I can Open/Close my front door and see the state changes in HA but the currently open Garage door does not change. Closing and opening the Garage door brings it back to life in HA. For some reason it seems the integration is not polling the current state on restart, and instead is waiting for updates from konnected?
Edit: Disabling and then re-adding Pin 2 brings it to life in HA also.
Kinda hard to notice this snip from the konnected web interface. Pin 2 is the Garage:
Garage not updating. This is after Front was open/closed and changed states. They are listed alphabetical, but Pin 1 is Front Entry and Pin 2 is Garage Entry
Well I was typing up a reply and verifying again. I was able to duplicate it several times in a row. Rebooting my Ubuntu server would fix it the first start up, but the next HA restart it would go from Open to Closed. The only error on startup besides failing to reach update server, was a message about untested HACS and how it could cause problems. I’m not sure I even installed HACS successfully, but I found it in the custom_components directory and deleted it. Now when I restart HA it shows the correct state by first going to “unknown” and then updating itself to the current “open” status. Ironically I see 1 entry in the startup log now that says it was unable to connect to the Konnected IP to get status. But the status is correct, so it must have connected after that.
Bah. It reared its head again. At this time it seems to be sort of random, but mostly doesn’t show correct state. Manually closing/opening the sensor brings it back to life every time it isn’t showing correct after HA restart.