this post was submitted on 19 Feb 2026
71 points (97.3% liked)
homeassistant
18474 readers
72 users here now
Home Assistant is open source home automation that puts local control and privacy first.
Powered by a worldwide community of tinkerers and DIY enthusiasts.
Home Assistant can be self-installed on ProxMox, Raspberry Pi, or even purchased pre-installed: Home Assistant: Installation
Discussion of Home-Assistant adjacent topics is absolutely fine, within reason.
If you're not sure, DM @GreatAlbatross@feddit.uk
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Thank you, that's food for thought at least.
Can I ask about your light script? I have a bunch of smart bulbs that either don't support or don't expose the 'power-on behaviour' option, so in a power cut they come on full bright when power is restored, often in the middle of the night.
My HA is on a UPS so I've been trying to have it store the states of lights when the UPS switches to battery power (before they go to unavailable) and then restore those states when power comes back, but it's apparently way beyond my skill set. Curious as to how your "input list of lights" works and whether it could help me...
Here is the full script in case it's helpful. took a hot second of searching to set everything up, but now it's really easy to use. When you call the script inside an automation it has input fields just like if you're calling a built-in function like
light.turn_onFor your specific use case though, it may be easier to just take advantage of the built-in Scenes function. You can use an "entity snapshot" with "Scene: Create" a scene of the current state of your "bad" lights when the power goes out, then "Activate" that scene, perhaps with a couple of seconds transition time to smooth things out as soon as power is restored.
I use a similar scene based function to create flashing colored light alerts based on certain conditions.