From 622f58fe226227df2facc32c883292a58cb97a13 Mon Sep 17 00:00:00 2001 From: Tomasz Torcz Date: Sat, 10 Sep 2022 15:20:59 +0200 Subject: [PATCH] =?UTF-8?q?feat(lamki=20kanapowe):=20uzale=C5=BCnienie=20z?= =?UTF-8?q?apalena=20od=20stanu=20Kodi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rules/salon.lampka-stolowa.rules | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rules/salon.lampka-stolowa.rules b/rules/salon.lampka-stolowa.rules index 63d65fe..6612f61 100644 --- a/rules/salon.lampka-stolowa.rules +++ b/rules/salon.lampka-stolowa.rules @@ -105,8 +105,13 @@ then sSONOFF02_expected.postUpdate(ON) /* kanapa */ - sSONOFF09b.sendCommand(ON) - Thread::sleep(1000) + if ( Kodi_State.state == "Play" ) { + sSONOFF09b_expected.postUpdate(ON) + } else { + /* zapalamy tylko jeśli kodi nic nie gra */ + sSONOFF09b.sendCommand(ON) + Thread::sleep(1000) + } sSONOFF09a.sendCommand(ON) end