Hey gang, I need to bounce an idea off someone to check my logic. I have a simple automation that turns a hallway light on/off based on detected motion and ambient light levels. The light is integrated into an RF-controlled ceiling fan that I send commands to via a Bond Bridge. Sometimes the RF commands from the Bond are either not sent or not received, resulting in the light state being out of sync (the lights are on when HA thinks they're off and vice versa). What I'd like to do is add a test/validation step into the automation, to determine if the light state is backwards and fix it if it is.
#Add test/validation step to automation for dumb lights that aren't state-aware.
1 messages · Page 1 of 1 (latest)
Here's the automation: https://pastecode.io/s/v34iis8n
What I'm thinking is an if statement after the lights have been turned on/off, to test if the lux level has changed in the right direction. If it hasn't, then trigger a service call to the Bond Bridge to flip the tracked state of the light, and then turn the light on/off again.