Condition not allowed in script

My yaml should be configured according to the docs, but no luck.

yaml:

sequence:

  • condition:
    condition: state
    entity_id: switch.receiver
    state: “on”
  • service: homeassistant.turn_off
    entity_id: switch.receiver

Error:

[homeassistant.config] Invalid config for [script]: [condition] is an invalid option for [script]. Check: script->script->turnoffreceiver->sequence->0->condition. (See /home/hass/.homeassistant/configuration.yaml, line 262). Please check the docs at https://home-assistant.io/components/script/

According to the docs, it looks like this:

script:
  notify_pushover:
    sequence:
      - condition: state
        entity_id: ...

And please read the blue box on top of every page here. :slight_smile:

I have it exactly configured like that.

This is in my scripts.yaml file:

turnoffreceiver: !include scripts/script_ir_turnoff_receiver.yaml

and my script is:

sequence:
- condition:
    condition: state
    entity_id: switch.receiver
    state: "on"
- service: homeassistant.turn_off
  entity_id: switch.receiver

Edit: My bad. Wrong indentation… Thanks