Hi All,
I’ve been doing some home automation and need some help from the pros.
I use Alexa as my ecosystem.
I’ve got a motion sensor Tuya on the front door when it detects motion it turns on the hallway lights. I’ve set it as it turns off after 5 mins.
Now the hard part. If I request Alexa to turn on the lights by voice or switch hallway lights manually after detecting motion the lights turns off after 5 mins.
I want a Boolean code of if - else or. For example if my lights are manually turned on then motion sensor will not kick in to turn off lights. Or with voice commands or manual switch I can overwrite the motion sensor.
I'm not too sure about these things, but would it be easier to get the whole sequence to not run if the light is already on? So if hallway light is off and motion is detected then turn on the hallway light and turn off after 5 mins?