Rules regarding motionsensor

Hi guys,
First and foremost , thank you for your time.
Second, i have a few rules connected to the Livingroom lights that aren't working as they should.
And i would need some help in detecting what is wrong about it.
The ideas is :
If the time is between 23:00 and 00:00 and there is movement in the livingroom then the light should turn on and stay on as long as there is movement else turn off after 10 min.


  1. if the value of the variable Movie is off , then the lights should not activate
    (the variable Movie is activated when we want to watch a move and i want darkness in the room, there is a button that changes the variable to the status TRUE)
    2.Iluminance sensor is under 400 lumens.

IF (Time between 23:00 and 23:59(F) [FALSE]) THEN
Activate scenes: Living 10%
Delay 0:10:00
IF (Variable Movie(true) = true(T) OR
Living Sensor inactive(T) [TRUE]) THEN
Off: Lamp1, Lamp2, Lamp3

this are the condition on this rule:

Living Sensor active FALSE
Last Event Device motion inactive TRUE
Time between 23:00 and 23:59 FALSE
Variable Movie(true) = true TRUE
Illuminance of window light sensor(6) is < 400 TRUE
Vardagsrum Sensor inactive TRUE

My issue is that sometimes the rules doesn't turn off the lights or it doesn't stay active even if the motion sensor is active.
How would you do it?

Your probably trying to learn RM, but this is what the motion lighting app is for it should run quicker in ML app


Hi Mark,
Thanks for the reply.
The issue with the motion app is that i am not able to use different variables in order to control everything as I want.

Hi Furom,
Thank for the code: I will it.
I am uncertain about this: Cancel Delayed Actions
what does this do? : )

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.