Hey, ich habe eine Lichtsteuerung über 2 Sensoren, vorher hatte ich für jeden Sensor ein DOIF und das lief auch
([sensor_aufzug] eq "open" and [{sunset_abs(-30*60)}-{sunrise_abs(30*60)}] and [sonoff_s20] ne "ON") (set sonoff_s20 ON; sleep 300; set sonoff_s20 OFF)
([sensor_tuer] eq "open" and [{sunset_abs(-30*60)}-{sunrise_abs(30*60)}] and [sonoff_s20] ne "ON") (set sonoff_s20 ON; sleep 300; set sonoff_s20 OFF)
Jetzt wollte ich die kombinieren aber dann lässt er die Prüfung ob die Lampe schon an ist außen vor [sonoff_s20] ne "ON"
So hatte ich die definition:
(([sensor_aufzug] eq "open" or [sensor_tuer] eq "open") and [{sunset_abs(-30*60)}-{sunrise_abs(30*60)}] and [sonoff_s20] ne "ON") (set sonoff_s20 ON; sleep 300; set sonoff_s20 OFF)
Wo liegt der Fehler?
Sorry hat sich erledigt:
[sonoff_s20] ne "ON"
war das falsche reading
[sonoff_s20] ne "on"
ist korrekt, jetzt läuft es ;D