Greetings!
Please tell me about setting up a sonoff, my English is very poor (Google), which is probably why the search did not give a result.
Sonoff is configured through files of things and items, everything works well, except if the device is in the on state and disconnected from 220 volts, the lwt will change to offline, but the device status will remain as on. How to make the device status change to off in such a situation?
The state channel is needed for when, for example, the openHAB rebooted. The power channel changes only when the device is turned on or off.
Type switch : power "Power" [stateTopic="stat/box-heater-air/POWER1", commandTopic="cmnd/box-heater-air/cmnd/POWER1"]
Type switch : state "State" [stateTopic="tele/box-heater-air/STATE", transformationPattern="JSONPATH:$.POWER1"]
Yes! I use sonoff pow.
I have a rule written a couple of months ago, but commented out, I don’t remember why
Removed the comment, it works! And I was sure that using autoupdate = "false"
will not work.
Thank!