upsert/lutron-caseta-pro

Restarting Home Assistant reports wrong switch state

ronaldheft opened this issue · 2 comments

If my Lutron switch is left on, sometimes after I restart Home Assistant, Home Assistant thinks the switch is off. I have to toggle the switch for Home Assistant back to on for the states to sync back up.

This doesn't happen often, but I tinker with Home Assistant enough that it happens frequently enough to be noticeable. Haven't dove into code yet to see if anything looks suspicious on why that might occur.

One of the first things the component does is query for the state of each device. It will be visible with DEBUG logging turned on. Next time the state fails to update on startup, check for any kind of errors in the logs.

Thanks for the tip. I added the debug logging and I'm seeing output. Next time I notice an issue with the switch state, I'll follow up with an update (hopefully I'll catch it in the next week or so).