Hey everyone! I’ve been working on a fun project with my smart home setup, and I thought I’d share my experience in case it helps someone else. I wanted to create an automation that would stop running if I flicked a switch twice within 5 seconds. The goal was to have my Halloween/Christmas lights transition to a normal setting if I turned the switch off quickly.
I set up a counter to track the number of times the switch was turned on. The idea was that if the counter reached 2 within a short timeframe, the automation would stop and reset the lights. However, figuring out how to track the timing was a bit tricky.
After some research, I realized I could use another automation to reset the counter after 5 seconds. While it wasn’t the most elegant solution, it worked perfectly! Now, if I flick the switch twice quickly, the lights switch back to cool white, and the automation stops.
I’d love to hear if anyone else has tackled a similar problem or has a cleaner solution. It’s always great to learn new tips and tricks! ![]()