From 4cbf74ac089251076ea30dd00240805c1da6645f Mon Sep 17 00:00:00 2001 From: Tomasz Torcz Date: Sun, 3 Jan 2021 19:37:31 +0100 Subject: [PATCH] =?UTF-8?q?prototyp:=20przepiecie=20czerwonego=20przycisku?= =?UTF-8?q?=20na=20kontrole=20lampki=20nad=20sto=C5=82em?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bo skubana świeci po oczach za bardzo. --- rules/d1mini03.prototyp.rules | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rules/d1mini03.prototyp.rules b/rules/d1mini03.prototyp.rules index 856c025..5794872 100644 --- a/rules/d1mini03.prototyp.rules +++ b/rules/d1mini03.prototyp.rules @@ -26,11 +26,11 @@ 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) -/* }*/ + if (sSONOFF02.state == ON) { + sSONOFF02.sendCommand(OFF) + } else { + sSONOFF02.sendCommand(ON) + } end @@ -38,12 +38,12 @@ rule "d1mini03 synchronizuj kolorki" when Item sSONOFF01 received update or Item Mpd_quodlibet_StartStop received update or - Item sD1MINI04_refresh received update + Item sSONOFF02 received update then sD1MINI03_light_green.sendCommand(sSONOFF01.state.toString()) sD1MINI03_light_yellow.sendCommand(Mpd_quodlibet_StartStop.state.toString()) - sD1MINI03_light_red.sendCommand(sD1MINI04_refresh.state.toString()) + sD1MINI03_light_red.sendCommand(sSONOFF02.state.toString()) end