Delay in automations - error "Message malformed"

Hi
I’m trying to include a pause in an automation using the delay statement. But somehow I’m getting always errors. My test automation shall switch a light one, pause for 10 seconds and switches the light off again.
With the code below I get the error message
“Message malformed: offset None should be format ‘HH:MM’, ‘HH:MM:SS’ or ‘HH:MM:SS.F’ for dictionary value @ data[‘actions’][1][‘delay’]”

Please help - many thanks.
Achim
(PS: please allow stupid errors as I am a newbie to YAML)

image

Maybe as you don’t have a trigger? If you just have an action how will it trigger?

Or you need.

 -  delay:
      hours: 0
      minutes: 0
      seconds: 10

Never post images of text.
But you are missing the indentation on seconds.

So any of these:

  - delay: 10

  - delay: "00:00:10"

  - delay:
      seconds: 10

Also, change those horrible device actions into entity actions:

  - action: switch.turn_off
    target:
      entity_id: switch.INSERT_ENTITY_ID

where the entity ID is like switch.my_switch, not that long hex string.