import reguł

This commit is contained in:
root
2018-07-01 21:48:20 +02:00
parent 78d4c6c5e1
commit 1d85c1669f
13 changed files with 466 additions and 0 deletions

26
rules/wc.rules Normal file
View File

@@ -0,0 +1,26 @@
rule "Sprawdzaj zajętość WC"
when
Item lWC_lux received update
then
if (lWC_lux.state > 3) {
sWC_occupied.postUpdate(ON)
} else {
sWC_occupied.postUpdate(OFF)
}
end
/* HOLIDAY */
rule "Psikaj w WC"
when
Item sWC_occupied changed from ON to OFF or
Time cron "0 50 05 * * ?" or
Time cron "0 20 15 ? * MON-FRI" or
Time cron "0 10/20 15-21 ? * MON-FRI" or
Time cron "0 0,20,40 8-22 ? * SAT,SUN"
then
sD1MINI04_refresh.sendCommand(ON)
end