Automation that changes what brightness a dimmer will be next time its turned on?

I have a fairly large home assistant set-up with around 130 Lutron Caseta dimmers (Split across two hubs / accounts).

I want to create an automation (and preferably a blueprint to go with it) that changes what brightness the lights will turn on to the next time the are turned on based on time of day.

I have an automation that changes the value of a helper “input_number.auto_brightness” to a different value at different times of day:
12am-5am: 10
5am-7am: 40
7am-9am: 60
9am-4pm: 100
4pm-6pm: 70
6pm-8pm: 50
8pm-9pm: 40
9pm-12pm: 20

I want to make it so that when a light is turned on, either from some other automation or from a physical switch/dimmer, they will turn on with the brightness value of “input_number.auto_brightness”.

I am pretty used to setting up automations that turn lights on to certain brightnesses but it has to turn them on to do so.

I am really not sure where to start on this.

Any thoughts?

Welcome to the forums!

You could use the following service call in the action part of your automation:


service: light.turn_on
data:
  brightness_pct: |-
    {{ states('input_number.auto_brightness') |int }}
target:
  entity_id: "{{ trigger.entity_id }}"

With this large number of lamps, I would suggest a template trigger. How have you organised your caseta lights? As a group?

Thanks!

Maybe I am missing something, but won’t this just turn the light on?

If someone turned on the dimmer from the dimmer itself, it wont go to the “input_number.auto_brightness” value it will just go to 100% right?

If you have the automation trigger on the light being turned on then depending on the light it might work.
If there is a fade setting on the light itself then turn that on and it will give you a better chance