On quite a few items, but this causes the relay to ‘flick’ off/on when it reboots. As it keeps rebooting if I work on the network, and the wifi is gone, it will make this flicker every few minuttes.
I would very much like to keep the possibility to have the items ‘always on’ after a boot, but at the same time I don’t want them to do the flick, as at some point some switchmode psu are going to die from this.
So is there a way to modify the ‘on_boot’ so that it only turns the relay on, if it’s off?
will restore it’s previous state and if previous state isn’t known, it will turn the switch on. Wifi dropouts shouldnt wipe the state whereas powerloss will do.
How did you test this exactly? I’m trying to use a Blitzwolf BW-6 as a “measure only” plug. If I kick the plug from the wifi network it still toggles off the relay and turns it back on a few seconds later.
hmm mine never turns off, even survives firmware updates, even tho I can hear the click, I guess it comes from ALWAYS_ON and inverted pin, maybe it helps you!
Thanks, that did help. The relay does indeed appear to stay on in all cases (flash, reboot).
I do hear the relay clicking when the BW-6 reboots (e.g. after flashing new firmware) but the device itself (as a test; another BW-6 with the LED on) seems to stay on.
The only downside is that the LED doesn’t go on upon boot, but that can probably be solved some way. I do like the “feedback” it provides.
Also didn’t know that the api also has a reboot_timeout parameter. That explains why the relay turned off before when my HASS was down for a bit
Hmmm check my integration’s Blue LED light and the binary sensor. The blue led should have the same state as the relay, except when you press the device button manually. I have commented out the ability to switch the relay because I was pressing it by accident a couple of times. it turns back on after a reboot.
The red led is exposed as a powerindicator it turns on when a certain value is reached.