kanapa: zmiana sonoffa basic na dual
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.
This commit is contained in:
@@ -3,10 +3,10 @@ rule "d1m03 przełączaj zielone"
|
||||
when
|
||||
Item sD1MINI03_button_green received update
|
||||
then
|
||||
if (sSONOFF01.state == ON) {
|
||||
sSONOFF01.sendCommand(OFF)
|
||||
if (sSONOFF09b.state == ON) {
|
||||
sSONOFF09b.sendCommand(OFF)
|
||||
} else {
|
||||
sSONOFF01.sendCommand(ON)
|
||||
sSONOFF09b.sendCommand(ON)
|
||||
}
|
||||
end
|
||||
|
||||
@@ -36,11 +36,11 @@ end
|
||||
|
||||
rule "d1mini03 synchronizuj kolorki"
|
||||
when
|
||||
Item sSONOFF01 received update or
|
||||
Item sSONOFF09b received update or
|
||||
Item Mpd_quodlibet_StartStop received update or
|
||||
Item sSONOFF02 received update
|
||||
then
|
||||
sD1MINI03_light_green.sendCommand(sSONOFF01.state.toString())
|
||||
sD1MINI03_light_green.sendCommand(sSONOFF09b.state.toString())
|
||||
|
||||
sD1MINI03_light_yellow.sendCommand(Mpd_quodlibet_StartStop.state.toString())
|
||||
|
||||
|
||||
9
rules/salon.kanapowe.rules
Normal file
9
rules/salon.kanapowe.rules
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
/* Lampki kanapowe po stronie Asi działają jako master */
|
||||
rule "Synchronizuj prawe kanapowe z lewymi"
|
||||
when
|
||||
Item sSONOFF09a received update
|
||||
then
|
||||
sSONOFF09b.send_update(sSONOFF09a.state)
|
||||
end
|
||||
|
||||
@@ -4,7 +4,10 @@ rule "Gramy!"
|
||||
when
|
||||
Item Kodi_State changed to Play
|
||||
then
|
||||
/* cottonballs */
|
||||
sOWFS01.sendCommand(OFF)
|
||||
/* prawe kanapowe */
|
||||
sSONOFF09b.sendCommand(OFF)
|
||||
|
||||
Mpd_quodlibet_StartStop_expected.postUpdate(Mpd_quodlibet_StartStop.state)
|
||||
Mpd_quodlibet_StartStop.sendCommand(OFF)
|
||||
@@ -24,6 +27,7 @@ then
|
||||
/* ponizsze generuje w linijce z ifem: The name '<XFeatureCallImplCustom> == <XFeatureCallImplCustom>' cannot be resolved to an item or type.
|
||||
var OnOffType preQL = Mpd_quodlibet_StartStop_expected.state */
|
||||
var preQL = Mpd_quodlibet_StartStop_expected.state.toString()
|
||||
var preCL = sSONOFF09b_expected.state.toString() /* prawe couchlight */
|
||||
|
||||
logInfo("niegramy", "Restore QL to {}", preQL)
|
||||
/* Mpd_quodlibet_StartStop.sendCommand(preQL.toString())*/
|
||||
@@ -44,6 +48,11 @@ then
|
||||
sendCommand(sOWFS01, ON)
|
||||
}
|
||||
|
||||
logInfo("niegramy", "Restore Right Couchlights to {}", preCL)
|
||||
if (preCL = "ON") {
|
||||
sSONOFF09b.sendCommand(ON)
|
||||
}
|
||||
|
||||
sBCacheWriteback.sendCommand(OFF)
|
||||
end
|
||||
|
||||
|
||||
@@ -48,10 +48,10 @@ then
|
||||
if (wClouds.state > 90.0) {
|
||||
logInfo("stollampka", "Powyżej 90% chmur, zapalam")
|
||||
|
||||
sSONOFF02.sendCommand(ON)
|
||||
/* sSONOFF02.sendCommand(ON) */
|
||||
sSONOFF02_expected.postUpdate(ON)
|
||||
|
||||
sSONOFF01.sendCommand(ON)
|
||||
sSONOFF09a.sendCommand(ON)
|
||||
}
|
||||
end
|
||||
|
||||
@@ -88,10 +88,11 @@ then
|
||||
dSONOFF02LED.sendCommand(1023)
|
||||
Thread::sleep(500)
|
||||
|
||||
sSONOFF02.sendCommand(ON)
|
||||
/* sSONOFF02.sendCommand(ON) */
|
||||
sSONOFF02_expected.postUpdate(ON)
|
||||
|
||||
sSONOFF01.sendCommand(ON)
|
||||
|
||||
sSONOFF09a.sendCommand(ON)
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user