lampki w salonie: zapalanie wczesniej (2h przed zachodem) gdy pochmurno

This commit is contained in:
root
2018-07-09 21:10:54 +02:00
parent aeaef9ff4c
commit 715eb4836b
4 changed files with 21 additions and 1 deletions

View File

@@ -27,7 +27,25 @@ then
end
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")
sSONOFF02.sendCommand(ON)
sSONOFF02_expected.postUpdate(ON)
sSONOFF01.sendCommand(ON)
}
end
/* TODO: przerobic na espeasy pulse command.
pulse 500ms, thread sleep 1s*/
rule "Zapal lampkę i kanapowe przed zmierzchem"
when
Item sSunset_Event_in_halfhour received update ON