Message malformed: extra keys not allowed @ data['countdown_script']

Hello

I am using the following system and I am not sure if my problem has to do with some changes within HA because solution to the extra key problem that I found are not working.

  • Core 2025.3.4
  • Supervisor 2025.03.3
  • Operating System 15.0
  • Frontend 20250306.0

My script is as follows:

countdown_script:
  alias: "Start Countdown"
  sequence:
    - service: timer.start
      target:
        entity_id: timer.countdown_timer
      data:
        duration: "{{ states('input_number.countdown_duration') | int }}:00:00"
    - wait_for_trigger:
        - platform: event
          event_type: timer.finished
          event_data:
            entity_id: timer.countdown_timer
    - service: persistent_notification.create
      data:
        message: "Countdown finished!"
        title: "Timer Complete"

Desperate I also tried AI to come up with a script and no matter which system I used the scripts were almost identical and similar to mine but all resulted in the same error message.

I have no idea what I should do next.

Cheers

sequence:
  - action: timer.start
    target:
      entity_id: timer.countdown_timer
    data:
      duration: "{{ states('input_number.countdown_duration') | int }}:00:00"

Don’t use AI. :grin:

it sounds like you have an indentation problem right at the beginning of the script. for some reason HA thinks that “countdown_script:” is part of some other piece of yaml.

What is a difference?)))

Where this code is located?
Is it a separate file for some script?
How do you include scripts?
I mean smth like “script: !include_xxxx …”.