Turn on light with button, auto turn off if no motion


I am trying to set up lights in the hallway, and I want to use a button to turn the light/mode on, and I want the light to turn off automatically if there's no motion after x minutes.. How do I do this in a simple way?

I have looked in motion app but it seems it only sets on the lights based on the motion..

Anyone done this? I have tried searching the forum but didn't find a solution for exactly this..

See below post using RULE MACHINE. Add your button/switch as an additional trigger. This will trigger on either the button or the motion, you can adjust if you only want to trigger on the button but not the motion. Use full logging to check the logic flow if the rule isn't following exactly how you want it to perform.

1 Like

Thank you,

I think I have got this working.. If it does it was a lot easier than I expected.. I struggle a bit with knowing what app I should use for which function.. I added this to a button:

Seems to have done the trick

1 Like