Listen to Many lightness for brightness change

Any ideas in the least cpu intensive way to listen for a large group of lights for brightness, on, or off changes? It’s approximately 40ish lights connected through lutron ra2. Essentially whenever a light is changed, I want to snapshot the state as a restore scene.

There is way to create a scene on the fly in order to save the current state of one or more entities. However, this “snapshot scene” is lost after a restart.

If that’s a dealbreaker then you will need to store the entity’s state and brightness in a Helper such as an input_text (that’s 40+ input_texts, one for each light). The data stored in a Helper does survive a restart.

Ya that’s perfectly fine. I just want to create an automation that triggers that scene snapshot whenever lights are changed. I could create triggers for each light individually, but having around 40ish seems excessive and wondering if there’s some easier way.

If you want to monitor 40 lights for changes to state and brightness
… you will have to monitor all 40 lights. :man_shrugging:

The sole workaround is to monitor the state_changed event … but that will trigger for every entity’s state-change and the condition will have to check if it’s one of the 40+ entities you’re interested in.

What’s worse, or less intensive? Triggers for all those lights or listen to events with a condition list?

  1. One State Trigger with 40 entities. That means 40 listeners triggered exclusively by the 40 switches.

  2. An Event Trigger with one listener, triggered by state-changes of every entity and then filtering with a condition to determine if it was one of the desired 40.

I like the sound of #1.