When I leave my house and check my hass.io I see that some switches that were ON at home are now displayed as OFF, when I know that the devices behind it are ON.
It stays that way when i return home
The switch that was OFF at home, was now ON when away from home (but the device behind it is OFF)
Besides this, I also noticed that this kind of behavior takes place when I restart Hass.io.
The displayed switches states don’t always match the real on/off state of the device.
Please provide details, because there are many components involved.
Like: Which frontend (and maybe browser), switch brand, how do you manage API access on these devices…
Hey, is it not working for all or only for some of your devices?
If only for some you could check it you have retain configured for all of them.
At least in your snipped Washok has retain set to false.
Strangely It looks like what ON, will display as OFF and vice versa after reboot.
So after reboot the devices that are running, are marked as OFF in Hass.io.
I played around with retain, but that didn’t solve it.