import reguł
This commit is contained in:
49
rules/d1mini03.prototyp.rules
Normal file
49
rules/d1mini03.prototyp.rules
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
rule "d1m03 przełączaj zielone"
|
||||
when
|
||||
Item sD1MINI03_button_green received update
|
||||
then
|
||||
if (sOWFS01.state == ON) {
|
||||
sOWFS01.sendCommand(OFF)
|
||||
} else {
|
||||
sOWFS01.sendCommand(ON)
|
||||
}
|
||||
end
|
||||
|
||||
rule "d1m03 przełączaj żółte"
|
||||
when
|
||||
Item sD1MINI03_button_yellow received update
|
||||
then
|
||||
if (Mpd_quodlibet_StartStop.state == ON) {
|
||||
Mpd_quodlibet_StartStop.sendCommand(OFF)
|
||||
} else {
|
||||
Mpd_quodlibet_StartStop.sendCommand(ON)
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
rule "d1m03 przełączaj czerwone"
|
||||
when
|
||||
Item sD1MINI03_button_red received update
|
||||
then
|
||||
/* if (sD1MINI04_refresh.state == ON) {
|
||||
sD1MINI04_refresh.sendCommand(OFF)
|
||||
} else {*/
|
||||
sD1MINI04_refresh.sendCommand(ON)
|
||||
/* }*/
|
||||
end
|
||||
|
||||
|
||||
rule "d1mini03 synchronizuj kolorki"
|
||||
when
|
||||
Item sOWFS01 received update or
|
||||
Item Mpd_quodlibet_StartStop received update or
|
||||
Item sD1MINI04_refresh received update
|
||||
then
|
||||
sD1MINI03_light_green.sendCommand(sOWFS01.state.toString())
|
||||
|
||||
sD1MINI03_light_yellow.sendCommand(Mpd_quodlibet_StartStop.state.toString())
|
||||
|
||||
sD1MINI03_light_red.sendCommand(sD1MINI04_refresh.state.toString())
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user