I have a Sonoff NSPanel by my front door and I’m planning to have this automate the turning off of all the lights, setting alarm etc. However, I want to have it store what was previously on, and turn it back on when I get home… How would you recommend doing this?
My NSPanel is flashed with ESPHome and is working well if I just want to add individual lights etc.
I have enormous number of lights, lamps, so don’t want to select each one from a dropdown - I’d be there for a day doing this.
I think I could get a template to work through all lights and get their state, then save this (maybe) but not sure if I can update the state of a light using a template.
Automation looks like it needs to have a trigger, but I want this to be called only when I press a button on the NSPanel.
If I try create a script, it looks like I have to select every entity manually…
Cheers
Craig