upsert / lutron-caseta-pro

Custom Home Assistant Component for Lutron Caseta Smart Bridge PRO / RA2 Select
Apache License 2.0
184 stars 38 forks source link

Restarting Home Assistant reports wrong switch state #42

Closed ronaldheft closed 4 years ago

ronaldheft commented 4 years ago

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.

upsert commented 4 years ago

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.

ronaldheft commented 4 years ago

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).