diff --git a/items/wifi.items b/items/wifi.items index b1e5377..357f3b0 100644 --- a/items/wifi.items +++ b/items/wifi.items @@ -52,6 +52,7 @@ Switch rSONOFF03 "Conn s03 [%s]" { mqtt="<[motherqtt:/sonoff03/status:state:MAP( Switch sSONOFF06 "Przedpokój" { mqtt=">[motherqtt:/sonoff06/gpio/12:command:ON:1],>[motherqtt:/sonoff06/gpio/12:command:OFF:0]" } Number dSONOFF06LED "Przedpokój sonoff LED [%s]" { mqtt=">[motherqtt:/sonoff06/pwm/13:command:*:default]" } Switch sSONOFF06LED "Przedpokój LED" { mqtt=">[motherqtt:/sonoff06/gpio/13:command:ON:1],>[motherqtt:/sonoff06/gpio/13:command:OFF:0]" } +Switch sSONOFF06LEDtouch "Przedpokój LED dotykowy" { mqtt=">[motherqtt:/sonoff06/gpio/4:command:ON:1],>[motherqtt:/sonoff06/gpio/4:command:OFF:0]" } Switch sSONOFF06KEY "Włącznik hall przy drzwiach wejściowych [%s]" { mqtt="<[motherqtt:/sonoff06/touch/wejscie:state:MAP(espeasy_onoff.map)]" } Number wSONOFF06 "Wifi s06 przedpokój [%d dB]" (wifi) { mqtt="<[motherqtt:/sonoff06/wifi/:state:default]" } Switch rSONOFF06 "Conn s06 [%s]" { mqtt="<[motherqtt:/sonoff06/lwt:state:MAP(espeasy_lwt.map)]" } diff --git a/rules/przedpokój.rules b/rules/przedpokój.rules index 7af6962..0d0669e 100644 --- a/rules/przedpokój.rules +++ b/rules/przedpokój.rules @@ -28,6 +28,19 @@ then end*/ +rule "Przedpokój: podświetlaj przy drzwiach po ciemku" +when + Item sSONOFF06 received update +then + if (sSONOFF06.state == ON) { + sSONOFF06LEDtouch.sendCommand(OFF) + } else { + sSONOFF06LEDtouch.sendCommand(ON) + } +end + + + /* jak się urwie od internetu przyciskowi, zsynchronizuj stan światła na OFF */ rule "Przedpokój: synchronizuj stan jak włącznik się rozłączy z siecią" when diff --git a/sitemaps/tech.sitemap b/sitemaps/tech.sitemap index 202d598..1c62dc6 100644 --- a/sitemaps/tech.sitemap +++ b/sitemaps/tech.sitemap @@ -47,6 +47,7 @@ sitemap pbrk label="Szczegóły techniczne" Switch item=sSONOFF06 Switch item=sSONOFF06KEY Switch item=sSONOFF06LED + Switch item=sSONOFF06LEDtouch Text item=wSONOFF06 Switch item=rSONOFF06 }