- Platform information:
- Hardware: Pi 4B
- OS: openhabian
- openHAB version: OH3
I create a rule to turn my Hue-light-strip on and off by a shelly relay switch.
In OH2.5 it worked fine.
when
Item Schlafzimmer_Bettlicht_Wandschalter received update
then
if (Schlafzimmer_Bettlicht.state == ON) {
Schlafzimmer_Bettlicht.sendCommand(OFF) } else
Schlafzimmer_Bettlicht.sendCommand(ON)
end
After upgrade to OH3 the light ist turning on after reboot (cron or manuel) by itself.
What i have tried:
- delete the rule -> solved
- delete the Item an try it with an Hue Switch (State 4001.0) -> still existing
- change the values to:
then
if (Schlafzimmer_Bettlicht.state == OFF) {
Schlafzimmer_Bettlicht.sendCommand(ON) } else
Schlafzimmer_Bettlicht.sendCommand(OFF)
-> after reboot the light is still OFF but if its on at reboot it switched OFF
- change it to:
rule "Bettlicht Wandschalter steuert Bettlicht"
when
Item Schlafzimmer_Bettlicht_Wandschalter changed from ON to OFF or
Item Schlafzimmer_Bettlicht_Wandschalter changed from OFF to ON
then
if (Schlafzimmer_Bettlicht.state == ON) {
Schlafzimmer_Bettlicht.sendCommand(OFF) } else
Schlafzimmer_Bettlicht.sendCommand(ON)
end
-> not fixed
- changed to:
when
Item Schlafzimmer_Bettlicht_Wandschalter received command
then
if (Schlafzimmer_Bettlicht.state == ON) {
Schlafzimmer_Bettlicht.sendCommand(OFF) } else
Schlafzimmer_Bettlicht.sendCommand(ON)
end
Does anyone know the prob or the solution?
edit: - I tryed to reset the light and connect it new but it doesnt solve the problem. I think the problem is, that OH3 starts the rule after reboot. Why?