Change Automation trigger parameter without restarting HA

Hi, I’m using HA as an alarm clock via automation, using something like this:

- alias: Wake up
  trigger:
    platform: time
    after: '07:00:00'
  action:
    service: script.turn_on
    entity_id: script.wakeup

I’d like to combine it with data coming from an Input Select to have after parametrized instead of hardcoded into the configuration, to avoid a config change and a restart any time I want to edit the wake up time, but if I understand it correctly, the only dynamic config content is available through the value_template properly.

Is there currently any other way to achieve this? Thanks

For now, only thing you can do is create multiple automations, and put condition based on the value of the input_select component.
Something like this:

- alias: '6:35 AM'
  trigger:
    platform: time
    after: '06:35'
  condition:
    - platform: state
      entity_id: input_select.alarma_cuarto
      state: '06:35'
  action:
    service: scene.turn_on
    entity_id: scene.despiertacuarto
1 Like

Thanks @danichispa, I felt there was no easy way but indeed this should work and it’s not too much of boilerplate for my case so I’ll try it out

Perhaps this could help too

1 Like