Can someone please tell me, what iam doing wrong in my automation

I want to change the date of the input_datetime.led_on entity. The automation activates as it should, but the input_datetime.led_on entity does not change the value.

Im new to Home Assistant and could not figure out my mistake.

- alias: "test"
  trigger:
    - platform: state
      entity_id: switch.vegetationsphase
    - platform: state
      entity_id: switch.blutephase
    - platform: state
      entity_id: switch.trocknungsphase
    - platform: state
      entity_id: input_datetime.led_on_veg
    - platform: state
      entity_id: input_datetime.led_on_blu
    - platform: state
      entity_id: input_datetime.led_on_tro
  action:
    - choose:
        - conditions: >
            {{is_state('switch.vegetationsphase', 'on')}}
          sequence:
            - service: input_datetime.set_datetime
              target:
                entity_id: input_datetime.led_on
              data:
                datetime: "{{input_datetime.led_on_veg.strftime('%H:%M')}}"

You defined a time under the key datetime. try with key time

already tried :frowning:

If both input_datetime.led_on and input_datetime.led_on_veg are time-only:

time: "{{ states('input_datetime.led_on_veg') }}"

If one or more of them are date-and-time, we need to know which is which to give a workable template.

That you so much, this works :slight_smile:
This costed me like 3 hours.