diff --git a/items/wifi.items b/items/wifi.items index 1bbb658..93f63b4 100644 --- a/items/wifi.items +++ b/items/wifi.items @@ -82,7 +82,7 @@ Switch rSONOFF07 "Conn s07 wiatrak wc [%s]" { mqtt="<[motherqtt:/sonoff07/lwt:st relay 2 gpio5 */ Switch sSONOFF08a "Sypialnia cottonballs" { mqtt=">[motherqtt:/sonoff08/gpio/12:command:ON:1],>[motherqtt:/sonoff08/gpio/12:command:OFF:0]" } -Switch sSONOFF08b "Sypialnia nawilżacz" { mqtt=">[motherqtt:/sonoff08/gpio/5:command:ON:1],>[motherqtt:/sonoff08/gpio/5:command:OFF:0]" } +Switch sSONOFF08b "Sypialnia gwiazdki" { mqtt=">[motherqtt:/sonoff08/gpio/5:command:ON:1],>[motherqtt:/sonoff08/gpio/5:command:OFF:0]" } Switch sSONOFF08_ext "Sypialnia przycisk" { mqtt="<[motherqtt:/sonoff08/button/ext:state:MAP(espeasy_onoff.map)]" } Number wSONOFF08 "Wifi s08 sypialnia [%d dB]" (wifi) { mqtt="<[motherqtt:/sonoff08/sysinfo/wifi:state:default]" } Switch rSONOFF08 "Conn s08 sypialnia [%s]" { mqtt="<[motherqtt:/sonoff08/lwt:state:MAP(espeasy_lwt.map)]" } diff --git a/rules/sypialnia.dual.rules b/rules/sypialnia.dual.rules index a892b4c..90bb135 100644 --- a/rules/sypialnia.dual.rules +++ b/rules/sypialnia.dual.rules @@ -29,11 +29,20 @@ when Item sSunset_Event received update ON then sSONOFF08a.sendCommand(ON) + sSONOFF08b.sendCommand(ON) end -rule "Zgaś lampki w sypialni wieczorem" +rule "Zgaś gwiazdki w sypialni wieczorem" when Time cron "0 00 22 * * ?" +then + sSONOFF08b.sendCommand(OFF) +end + +rule "Zgaś cottonballs w sypialni wieczorem" +when + Time cron "0 18 22 * * ?" then sSONOFF08a.sendCommand(OFF) end +