Managing Smart Bulbs During Power Restores

I’ve been dealing with a common issue where my smart bulbs turn on automatically after a power outage. This can be quite annoying, especially when power failures are frequent. After some research and experimentation, I found a solution using Home Assistant automations that I’d like to share.First, I set up a binary sensor to detect power outages. This sensor monitors the state of my smart bulbs and triggers when there’s a loss of power. Once the power is restored, the automation kicks in and turns off all the bulbs that were previously on. To make it even better, I added a feature to restore the bulbs to their previous state after a short delay, ensuring a seamless transition.Here’s a quick breakdown of the steps I took:- Configured a binary sensor to detect power outages.- Created an automation to turn off bulbs upon power restore.- Added a delay to restore bulbs to their pre-outage state.This setup has been working perfectly for me, and I hope it can help others facing the same issue. Let me know if you have any questions or suggestions for improvement!