I’m trying to use a motion sensor to control lights. I also control the lights using Alexa voice commands.
Scenario A: If motion is detected, my bedroom lights are on and my downstairs lights are off, the status should flip (downstairs turns on, bedroom turns off).
Scenario B: the reverse is if bedroom lights are off and downstairs lights are on, the bedroom lights should turn on and the downstairs lights should turn off.
Let’s say I engage scenario A: the result is downstairs is on, bedroom is off. If I then tell Alexa to turn on the bedroom lights, nothing should happen if I pass the motion sensor because both downstairs and bedroom lights are on. Instead, WebCore still thinks the bedroom lights are off, and Scenario B is fired.
How do obtain the actual current light status in the piston?