Is there a way to specify a state of a device in a rule to be not more than n minutes on or off
eg:
if lamp A is turned on and lamp is on for not more than 5 minutes then do something
cheers
Rules: not more than n minutes
Is there a way to specify a state of a device in a rule to be not more than n minutes on or off
eg:
if lamp A is turned on and lamp is on for not more than 5 minutes then do something
cheers
That is exactly not what i want. I don’t want the span from 5 minutes to infinty, i want the span from zero to five minutes.
I don’t want the rule to be executed if Lamp B is on for more than five minutes
Ok, thats clear. My next suggestion
lamp A is on and if lamp B is on for 5 minutes then <action>
This rules executes when lamp B is on for more than 5 minutes and then when lamp A is switched on.
The ‘if lamp B is on for 5 minutes’ is a state that must be reached before switch on of lamp A will take effect
Thanks for your efforts but truly i don’t want to the rule to be triggered after 5 minutes of Lamp B being on. I want it to be triggered only if Lamp B is less than 5 Minutes on.
Lamp B is on for 3 minutes and lamp A turns on --> Rule executed
Lamp B is on for 1 minute and lamp A turns on --> Rule executed
Lamp B is on for 5 minutes and lamp A turns on --> Rule not executed
Lamp B is on for 15 or whatever more of that minutes and lamp A turns on --> Rule not executed
Its getting clearer
I think you need a dummy presence sensor to do this.
Create a DummyPresence sensor with name like ‘not-yet-5-minutes’ and switch autoreset on and set the resettime to 30000 (is 5 minutes)
The following rules
Only when lamp B switches on again lamp A can be switched on again within 5 minutes.
Yh thats what i had for now with a dummy switch and two rules
If lamp b is turned on then turn on dummyswitch and turn off dummyswitch after 5 minutes
and then if lamp A is turned on and dummyswitch is on then blablabla
I was thinking if there is a more elegant way of having this without having to create an extra device and an extra rule for each lamp B i want this case to be happening.
I like my config short and simple