import reguł
This commit is contained in:
90
rules/salon.lampka-stolowa.rules
Normal file
90
rules/salon.lampka-stolowa.rules
Normal file
@@ -0,0 +1,90 @@
|
||||
|
||||
/*
|
||||
rule "Zapal stółlampkę rano"
|
||||
when
|
||||
Time cron "0 47 5 ? * MON-FRI *"
|
||||
then
|
||||
sSONOFF02.sendCommand(ON)
|
||||
end
|
||||
*/
|
||||
|
||||
|
||||
rule "Zgaś stółlampkę rano"
|
||||
when
|
||||
Time cron "0 30 6 * * ?"
|
||||
then
|
||||
sSONOFF02.sendCommand(OFF)
|
||||
end
|
||||
|
||||
|
||||
|
||||
rule "Zapal sufitowe przed zachodem"
|
||||
when
|
||||
Item sSunset_Event_in_hour received update ON
|
||||
then
|
||||
/* HOLIDAY */
|
||||
sD1MINI01_lampki_sufitowe.sendCommand(ON)
|
||||
end
|
||||
|
||||
|
||||
|
||||
rule "Zapal lampkę i kanapowe przed zmierzchem"
|
||||
when
|
||||
Item sSunset_Event_in_halfhour received update ON
|
||||
then
|
||||
dSONOFF01LED.sendCommand(0)
|
||||
dSONOFF02LED.sendCommand(0)
|
||||
Thread::sleep(500)
|
||||
dSONOFF01LED.sendCommand(1023)
|
||||
dSONOFF02LED.sendCommand(1023)
|
||||
Thread::sleep(500)
|
||||
|
||||
dSONOFF01LED.sendCommand(0)
|
||||
dSONOFF02LED.sendCommand(0)
|
||||
Thread::sleep(500)
|
||||
dSONOFF01LED.sendCommand(1023)
|
||||
dSONOFF02LED.sendCommand(1023)
|
||||
Thread::sleep(500)
|
||||
|
||||
dSONOFF01LED.sendCommand(0)
|
||||
dSONOFF02LED.sendCommand(0)
|
||||
Thread::sleep(500)
|
||||
dSONOFF01LED.sendCommand(1023)
|
||||
dSONOFF02LED.sendCommand(1023)
|
||||
Thread::sleep(500)
|
||||
|
||||
sSONOFF02.sendCommand(ON)
|
||||
sSONOFF02_expected.postUpdate(ON)
|
||||
|
||||
sSONOFF01.sendCommand(ON)
|
||||
end
|
||||
|
||||
rule "Przedzgaś stółlampkę wieczorem"
|
||||
when
|
||||
Time cron "0 12 22 * * ?"
|
||||
then
|
||||
dSONOFF01LED.sendCommand(0)
|
||||
dSONOFF02LED.sendCommand(0)
|
||||
end
|
||||
|
||||
rule "Zgaś stółlampkę i kanapowe wieczorem"
|
||||
when
|
||||
Time cron "0 15 22 * * ?"
|
||||
then
|
||||
sSONOFF02.sendCommand(OFF)
|
||||
sSONOFF02_expected.postUpdate(OFF)
|
||||
dSONOFF02LED.sendCommand(1023)
|
||||
|
||||
sSONOFF01.sendCommand(OFF)
|
||||
dSONOFF01LED.sendCommand(1023)
|
||||
end
|
||||
|
||||
/*
|
||||
1 Seconds
|
||||
2 Minutes
|
||||
3 Hours
|
||||
4 Day-of-Month
|
||||
5 Month
|
||||
6 Day-of-Week
|
||||
7 Year (optional field)
|
||||
*/
|
||||
Reference in New Issue
Block a user