Im slowly adding Zigbee smart switches throughout the home and wanting to be able to use ALL buttons to trigger an ‘emergency mode’ that will turn on every light in the house if there’s a long-press detected. Right now, i have 3 of them working perfect, but it’s a good amount of coding for it. I have a counter set up for tracking if the emergency mode is active or not, letting me cancel it with a short press.
I plan to add another 12 buttons throughout the house, so I’m wondering if there’s an easier way to do the automation for each button without a LOT of copy/paste. Maybe a Blueprint, where i specify the “normal” device the button would operate?
Basically, it would do this:
1 - long-press detected (any button)
2 - set mode counter to 1
3 - save current light scene
4 - turn on all lights
5 - short-press detected (any button)
6 - restore saved scene
7 - set mode counter to 0
I can already do all of those actions from the 3 current buttons. Im just asking about how to do it more easily in the automations.