Files
openhab/rules/wc.rules

27 lines
456 B
Plaintext
Raw Normal View History

2018-07-01 21:48:20 +02:00
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-21 ? * SAT,SUN"
2018-07-01 21:48:20 +02:00
then
sD1MINI04_refresh.sendCommand(ON)
end