Setting up multiple / complex automation

I have a similar setup for my hot water tank. I have a schedule defined by input_datetime and input_number helpers, with separate workday and non-workday schedules (workday integration):

My single automation to manage the target value (which is also an input_number):

- alias: Hot water - tank target manager

  description: >-
    This automation updates the value of the tank target based on the values in the
    schedule. The action identifies which slot matches the current time, then sets
    the target to that slot's target value.

  id: 9ac52ecb-3e29-4474-b64b-9261ee9dce4e

  trigger:
    - platform: template
      value_template: >
          {{ (states('binary_sensor.workday_sensor') == 'off') and
             (states('sensor.time') in
             [states('input_datetime.wehw1_time')[0:5],
              states('input_datetime.wehw2_time')[0:5],
              states('input_datetime.wehw3_time')[0:5],
              states('input_datetime.wehw4_time')[0:5],
              states('input_datetime.wehw5_time')[0:5]]) }}
    - platform: template
      value_template: >
          {{ (states('binary_sensor.workday_sensor') == 'on') and
             (states('sensor.time') in
             [states('input_datetime.wdhw1_time')[0:5],
              states('input_datetime.wdhw2_time')[0:5],
              states('input_datetime.wdhw3_time')[0:5],
              states('input_datetime.wdhw4_time')[0:5],
              states('input_datetime.wdhw5_time')[0:5]]) }}

  condition:
    condition: not
    conditions:
      - condition: state
        entity_id: sensor.time
        state: '00:00'

  action:
    - service: input_number.set_value
      data_template:
        entity_id: input_number.tank_target
        value: >
          {% if states('binary_sensor.workday_sensor') == 'off' %}
            {% set idx = [states('input_datetime.wehw1_time')[0:5],
                          states('input_datetime.wehw2_time')[0:5],
                          states('input_datetime.wehw3_time')[0:5],
                          states('input_datetime.wehw4_time')[0:5],
                          states('input_datetime.wehw5_time')[0:5]].index(states('sensor.time')) %}
            {{ [states('input_number.wehw1_tgt'),
                states('input_number.wehw2_tgt'),
                states('input_number.wehw3_tgt'),
                states('input_number.wehw4_tgt'),
                states('input_number.wehw5_tgt')][idx] }}
          {% else %}
            {% set idx = [states('input_datetime.wdhw1_time')[0:5],
                          states('input_datetime.wdhw2_time')[0:5],
                          states('input_datetime.wdhw3_time')[0:5],
                          states('input_datetime.wdhw4_time')[0:5],
                          states('input_datetime.wdhw5_time')[0:5]].index(states('sensor.time')) %}
            {{ [states('input_number.wdhw1_tgt'),
                states('input_number.wdhw2_tgt'),
                states('input_number.wdhw3_tgt'),
                states('input_number.wdhw4_tgt'),
                states('input_number.wdhw5_tgt')][idx] }}
          {% endif %}

The condition is to ignore any “unset” schedule slots, with the side-effect that I can’t set a slot to midnight. You’ll need sensor.time to use this: see the time_date integration.