From 896984b299e89dfc912b3130d6a6edff39b51a96 Mon Sep 17 00:00:00 2001 From: Tomasz Torcz Date: Tue, 9 Jun 2020 20:42:07 +0200 Subject: [PATCH] =?UTF-8?q?prototyp=20pilota:=20prze=C5=82=C4=85czanie=20z?= =?UTF-8?q?ielonym=20lampek=20kanapowych?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wcześniej była lampa nad stołem. --- rules/d1mini03.prototyp.rules | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rules/d1mini03.prototyp.rules b/rules/d1mini03.prototyp.rules index de63246..856c025 100644 --- a/rules/d1mini03.prototyp.rules +++ b/rules/d1mini03.prototyp.rules @@ -3,10 +3,10 @@ rule "d1m03 przełączaj zielone" when Item sD1MINI03_button_green received update then - if (sSONOFF02.state == ON) { - sSONOFF02.sendCommand(OFF) + if (sSONOFF01.state == ON) { + sSONOFF01.sendCommand(OFF) } else { - sSONOFF02.sendCommand(ON) + sSONOFF01.sendCommand(ON) } end @@ -36,11 +36,11 @@ end rule "d1mini03 synchronizuj kolorki" when - Item sSONOFF02 received update or + Item sSONOFF01 received update or Item Mpd_quodlibet_StartStop received update or Item sD1MINI04_refresh received update then - sD1MINI03_light_green.sendCommand(sSONOFF02.state.toString()) + sD1MINI03_light_green.sendCommand(sSONOFF01.state.toString()) sD1MINI03_light_yellow.sendCommand(Mpd_quodlibet_StartStop.state.toString())