Do drugiego gniazdka podłączona lampka po prawej, która odbija się w ekranie. Przestawienie zielonego przycisku prototypu do przełączania tylko prawej lampki, nie obu. Przy okazji też zmiana w konfiguracji ha-bridge, żeby Echo dobrze gasiło.
50 lines
1.2 KiB
Plaintext
50 lines
1.2 KiB
Plaintext
|
|
rule "d1m03 przełączaj zielone"
|
|
when
|
|
Item sD1MINI03_button_green received update
|
|
then
|
|
if (sSONOFF09b.state == ON) {
|
|
sSONOFF09b.sendCommand(OFF)
|
|
} else {
|
|
sSONOFF09b.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 (sSONOFF02.state == ON) {
|
|
sSONOFF02.sendCommand(OFF)
|
|
} else {
|
|
sSONOFF02.sendCommand(ON)
|
|
}
|
|
end
|
|
|
|
|
|
rule "d1mini03 synchronizuj kolorki"
|
|
when
|
|
Item sSONOFF09b received update or
|
|
Item Mpd_quodlibet_StartStop received update or
|
|
Item sSONOFF02 received update
|
|
then
|
|
sD1MINI03_light_green.sendCommand(sSONOFF09b.state.toString())
|
|
|
|
sD1MINI03_light_yellow.sendCommand(Mpd_quodlibet_StartStop.state.toString())
|
|
|
|
sD1MINI03_light_red.sendCommand(sSONOFF02.state.toString())
|
|
end
|
|
|