Lights would benefit from a built-in “Previous Power State” option when the manufacturer does not offer this functionality. How many times does your home loose power over night, and you are woke to all your smart lights are turned on by default. If there was some way automatically add some kind of additional entity to lights being added to the system or switches that have been identified as a light that saved the current state of the light. Upon restart of the server from a power failure, HA on the last item of booting would fire a “Restore Light States”, and it will return all the lights to their previous state prior to power failure. (Yes, it might be a little time while HA boots back up, but at least you don’t have to check all your lights manually, or if you were not home, you don’t come back to a glowing home with all your lights lit up.)
This should be a mandatory requirement for manufacturers, but they don’t always do this.
I’m not sure how this would be doable. All I could see happening is that the lights would resume their states, then 3 minutes later when HA is fully booted up, your lights would turn off. At that point, you’d already be annoying. I’ve tried getting around this every way possible and it just does not work like it does when it’s at the firmware level.
Petro, the problem is the opposite… lets say you have gone to bed, you have all your lights turned off. The power goes out at you home, and then comes back on. All the smart lights that do not have a Previous State option billed into them (only seen it on ZIgbee Devices) will all turn on. You are awaken, and you need to wait for HA to boot back up, and when you look at your dashboard you see that 10-15 bulbs have turned on. You need to turn them off all manually.
What I am saying when adding “Lights” to HA, you always get that entity, but you might have an entity that HA is always updating which is the lights current state. If the power goes out, upon HA booting up, it knows it was a power failure and triggers a automation or some programming that walks through all these entities to a resets the lights to the state they were prior to power failure.
I know you could do this manually yourself with helpers, but it seems to be such a common issue with Smart Homes that could help with “spouse approval” because as mine says, if I shut the switch off, I never have to worry about being waken in the middle of the night because the light does not know if it should be on or off
Yes, that’s exactly what I’m saying. Regardless what happens, the lights will turn on and wake you up because of the delay between returning power and HA booting up.
I have all the groundwork set up in my system to do this, however is still does not get the approval factor. That’s what I’m saying. I still have to deal with the lights turning on and waking me up even though my system detects the outage and resumes the previous state. I’m saying “the juice is not worth the squeeze”. The only approving factor I have for it is that I don’t have to touch my phone. My spouse still gets annoyed at me