From 4c6c6c12a0d77f220c065ce04a103c8342400e5a Mon Sep 17 00:00:00 2001 From: Tomasz Torcz Date: Sat, 18 Apr 2020 18:20:58 +0200 Subject: [PATCH] salon: zapalanie lampki wczesniej przy 90% chmur --- rules/salon.lampka-stolowa.rules | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rules/salon.lampka-stolowa.rules b/rules/salon.lampka-stolowa.rules index d0efc39..67ef5dc 100644 --- a/rules/salon.lampka-stolowa.rules +++ b/rules/salon.lampka-stolowa.rules @@ -42,9 +42,9 @@ rule "Zapal lampkę i kanapowe przez zmierzchem gdy pochmurno" when Item sSunset_Event_in_twohours received update ON then - /* more than 60% cloud cover */ - if (wClouds.state > 60.0) { - logInfo("stollampka", "Powyżej 60% chmur, zapalam") + /* more than 90% cloud cover */ + if (wClouds.state > 90.0) { + logInfo("stollampka", "Powyżej 90% chmur, zapalam") sSONOFF02.sendCommand(ON) sSONOFF02_expected.postUpdate(ON) @@ -63,6 +63,7 @@ rule "Zapal lampkę i kanapowe przed zmierzchem" when Item sSunset_Event_in_halfhour received update ON then + dSONOFF01LED.sendCommand(0) dSONOFF02LED.sendCommand(0) Thread::sleep(500)