Persistent variables in Blueprint

Hi there,

I am currently developing a blueprint to implement a relatively complex light automation system in interaction with media players. The whole thing is triggered by a motion sensor in dependence with lux values of a brightness sensor.

So far everything works. However, the brightness sensor is within the range of influence of the switched lamps and then of course delivers values that are higher than the threshold value for switching on the light.

The actions of the Blueprint are executed again when the motion sensor is triggered again and thus the threshold value is exceeded and the light switches off.

My first approach was a template sensor that uses the average value of the brightness of the last 5 minutes. Helps only conditionally.

Now I wonder if there is a way to use only the initial value of the brightness sensor during the entire runtime. So on another run by re-triggering the current brightness value is not used.

Something like persisted variables?

Save that value as an input_number. Update the input_number on your own schedule.