Watch a bulb and turn off if no motion for a period of time


Could someone write a program in rule macine that watches if a bulb is switched on (light whatever) and turn off if there is no motion for a period of time? Would cancel off if there is motion again within the time frame.
Im asking for this bacause the room lightin app is very unreliable and over complicated.
Thank you very much.

The rule below would do it, I think. If the light comes on, it will shut it off if no activity for 5 minutes.

Did you try basic rules? It might be able to do what you want and it will step you through it.

I dont get what you just sent.
Basic rule would not cancel countdown when there is motion again

You don't understand? I don't have basic rules installed so i don't know exactly what it will or won't do.

Actually I have Basic rules installed on my Shop Hub and I just went through it and you can do this with basic rules.

When switch turns on
Then wait for 1 sec(after you add a wait you can then add a wait until. Not sure why you can't do that to begin with but that is how it seems to work. One of the options is wait until motion is stopped for some preset amount of time.
Then add another action to turn off the switch.

cheers for the idea. its working alright
thank you very much