diff --git a/rules/salon.kodi.rules b/rules/salon.kodi.rules index 20c3b2d..1cc1e12 100644 --- a/rules/salon.kodi.rules +++ b/rules/salon.kodi.rules @@ -9,6 +9,9 @@ then /* prawe kanapowe */ sSONOFF09b_expected.postUpdate(sSONOFF09b.state) sSONOFF09b.sendCommand(OFF) + /* lampka nad stoĊ‚em */ + sSHELLY02_expected.postUpdate(sSHELLY02.state) + sSHELLY02.sendCommand(OFF) Mpd_quodlibet_StartStop_expected.postUpdate(Mpd_quodlibet_StartStop.state) Mpd_quodlibet_StartStop.sendCommand(OFF) @@ -29,6 +32,7 @@ then var OnOffType preQL = Mpd_quodlibet_StartStop_expected.state */ var preQL = Mpd_quodlibet_StartStop_expected.state.toString() var preCL = sSONOFF09b_expected.state.toString() /* prawe couchlight */ + var preTL = sSHELLY02_expected.state.toString() logInfo("niegramy", "Restore QL to {}", preQL) /* Mpd_quodlibet_StartStop.sendCommand(preQL.toString())*/ @@ -54,6 +58,10 @@ then sSONOFF09b.sendCommand(ON) } + if (preTL == "ON") { + sSHELLY02.sendCommand(ON) + } + sHighPerformance.sendCommand(OFF) end