End of the stream or a document separator is expected in automations.yaml

Hi i still have these errors in automation.yaml after the alst update of HM

- id: accendi_luce_doccia
  alias: "Accendi luce doccia"
  trigger:
    platform: numeric_state
    entity_id: sensor.umiditabagno
    above: 65
  action:
    - service: switch.turn_on
      entity_id: switch.doccia
    - delay: "00:20:00"
    - service: switch.turn_off
      entity_id: switch.doccia
  condition:
    - condition: numeric_state
      entity_id: sensor.umiditabagno
      above: 65

errors are at line 1-2-11 and is always the same “End of the stream or a document separator is expected”. I thing that the problem is the indentation but i don’t what to correct, it seems correct.

Can you help me? tks

Yeah most likely indentation. That one looks ok. Check your other automations.

You don’t need that condition by the way. Your trigger ensures the condition will always be true.

i’ve solved thanks

Indentation is all good.

What did you use to create the automations?

Windows uses CRLF as the line terminator:

Untitled

Linux just uses LF. This is what HA needs.

Untitled2

You can convert the line termination in advanced editors like notepad++, VSCode, or UltraEdit.

It would help others if you told us how you solved it.

i had a line “automation” at the top, i hadn’t seen it

1 Like