balkon: zamiana sterowania lampkami z sonoffa na shelly

This commit is contained in:
2019-11-21 19:02:01 +01:00
parent 0830553a71
commit 8e051fd17c
3 changed files with 32 additions and 10 deletions

View File

@@ -7,7 +7,7 @@ then
sSONOFF02.sendCommand(ON)
/* balkon */
sSONOFF05.sendCommand(OFF)
sSHELLY01.sendCommand(ON)
end
@@ -19,7 +19,7 @@ then
sSONOFF02.sendCommand(OFF)
/* balkon */
sSONOFF05.sendCommand(OFF)
sSHELLY01.sendCommand(OFF)
end
@@ -33,7 +33,7 @@ then
sD1MINI01_lampki_sufitowe.sendCommand(ON)
/* balkon */
sSONOFF05.sendCommand(ON)
sSHELLY01.sendCommand(ON)
end
/* HOLIDAY */
@@ -100,6 +100,7 @@ then
dSONOFF02LED.sendCommand(0)
end
rule "Zgaś stółlampkę, sufitowe i nablatowe wieczorem"
when
Time cron "0 15 22 * * ?"
@@ -113,7 +114,19 @@ then
sD1MINI02MOS.sendCommand(OFF)
/* balkon */
sSONOFF05.sendCommand(OFF)
sSHELLY01.sendCommand(OFF)
end
/* na wypadek rebootów sonoffa */
rule "Synchronizuj balkon & lampka po restarcie"
when
Item rSHELLY01 changed to ON or
Item rSONOFF02 changed to ON
then
logInfo("S02,SH01", "Reappeared, applying state balkon {}, lampka {}", sSHELLY01.state, sSONOFF02.state)
sSONOFF02.sendCommand(sSONOFF02.state.toString)
sSHELLY01.sendCommand(sSHELLY01.state.toString)
end
/*