Hi! This is the rule I want to make :
- Turn on Sonoff switch for TV
then - Turn on Sonoff Switch for Receiver
then - delay 10 seconds
then - Turn on WOL
Thanks!
Hi! This is the rule I want to make :
Thanks!
Hi there, we are going to need a few more details, please…
from top of my head…
syntax is probably wrong here and there, but for general idea:
rule "weird switches"
when
Item Sonoff_TV_Switch changed from OFF to ON
then
Sonoff_receiver.sendcommand(ON)
var now = Time.now
var timer = createTimer(now.plusSeconds(10))
createTimer(now.plusSeconds(10))
if(now > timer){
Whatever_is_WOL.sendcommand(ON)
}
end
Yes almost
The timer syntax is very different though.
rule "weird switches"
when
Item Sonoff_TV_Switch changed from OFF to ON
then
Sonoff_receiver.sendcommand(ON)
createTimer(now.plusSeconds(10), [ |
Whatever_is_WOL.sendCommand(ON)
])
end
createTimer(now.plusSeconds(10), [ |
Whatever_is_WOL.sendCommand(ON)
])
The | and [ where swapped and missing the “C” in sendCommand.
If I had a dime for every time I’ve done this I’d be a millionaire.
Thanks, I was rushing out.
Corrected above