Hi
Can someone help me creating a rule, that turns on a power outlet ie. at 11.00 o’clock, and then power it off again after 30 sec.
In the rule editor, the minimum setting are 1 min.
Thanks.
Hi
Can someone help me creating a rule, that turns on a power outlet ie. at 11.00 o’clock, and then power it off again after 30 sec.
In the rule editor, the minimum setting are 1 min.
Thanks.
You can use a CRON rule to turn the light on at a certain time, then use the expire binding to turn the light off 39 seconds later.
rule "turn on at 11am"
when
Time cron "0 0 11 ? * * *" // See: https://www.freeformatter.com/cron-expression-generator-quartz.html
then
myLight.sendCommand(ON)
end
3 options:
rule "turn on at 11am"
when
Time cron "0 0 11 ? * * *" // See: https://www.freeformatter.com/cron-expression-generator-quartz.html
then
myLight.sendCommand(ON)
createTimer(now.plusSeconds(30), | [
myLight.sendCommand(OFF)
])
end
Not nessasirly - you could always create two versions of the switch. One with the expire binding, one without.