From 6076ef8c07d3e4dd795b4132dc8f097b891b7ad5 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 26 Sep 2018 18:53:47 +0200 Subject: [PATCH] d1mini prototyp: zielonym przyciskiem przelaczaj lampke nad stolem Do tej pory przelaczalo cottobalsy. Funkcja jest bardzij potrzebna do lampki nad stolem, bo tam jest build ESPEasy, ktory czasem sie resetuje i lampka gasnie. . --- 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 e99d217..de63246 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 (sOWFS01.state == ON) { - sOWFS01.sendCommand(OFF) + if (sSONOFF02.state == ON) { + sSONOFF02.sendCommand(OFF) } else { - sOWFS01.sendCommand(ON) + sSONOFF02.sendCommand(ON) } end @@ -36,11 +36,11 @@ end rule "d1mini03 synchronizuj kolorki" when - Item sOWFS01 received update or + Item sSONOFF02 received update or Item Mpd_quodlibet_StartStop received update or Item sD1MINI04_refresh received update then - sD1MINI03_light_green.sendCommand(sOWFS01.state.toString()) + sD1MINI03_light_green.sendCommand(sSONOFF02.state.toString()) sD1MINI03_light_yellow.sendCommand(Mpd_quodlibet_StartStop.state.toString())