I am getting this error in my automations.yaml from HA when I start the server:
ERROR:homeassistant.util.yaml:expected '<document start>', but found '<block sequence start>'
in "/config/automations.yaml", line 244, column 1
Failed config
General Errors:
- expected '<document start>', but found '<block sequence start>'
in "/config/automations.yaml", line 244, column 1
…but I can’t understand what the problem is. If I check the syntax by copying and pasting it into the YAML syntax checker at www.yamllint.com it reports no errors. Can anyone tell me what’s wrong with the file?
Line 244 is the one which contains:
- alias: Microwave On In Evening
Here’s the full file:
# LMS GUI Volume control
- alias: "LMS GUI Volume Control"
initial_state: true
trigger:
- platform: state
entity_id: input_number.lms_volume
action:
- service: media_player.squeezebox_call_method
data_template:
entity_id: "media_player.{{states.input_select.lms_player.state}}"
command: "mixer"
parameters: ["volume", "{{states.input_number.lms_volume.state}}"]
# LMS GUI Sleep Time control
- alias: "LMS GUI Sleep Timer Control"
initial_state: true
trigger:
- platform: state
entity_id: input_number.lms_sleep_time
action:
- service: media_player.squeezebox_call_method
data_template:
entity_id: "media_player.{{states.input_select.lms_player.state}}"
command: "sleep"
parameters: ["{{states.input_number.lms_sleep_time.state|int * 60}}"]
# LMS GUI Shuffle On / Off
- alias: "LMS GUI Shuffle Control"
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.lms_shuffle
action:
- service: media_player.shuffle_set
data_template:
entity_id: "media_player.{{states.input_select.lms_player.state}}"
shuffle: >
{% if (states.input_boolean.lms_shuffle.state == "on") %} true
{% else %} false {% endif %}
# LMS GUI Repeat On / Off
- alias: "LMS GUI Repeat Control"
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.lms_repeat
action:
- service: input_text.set_value
data_template:
entity_id: input_text.lms_p1
value: >
{% if (states.input_boolean.lms_repeat.state == "on") %} 2
{% else %} 0 {% endif %}
- service: media_player.squeezebox_call_method
data_template:
entity_id: "media_player.{{states.input_select.lms_player.state}}"
command: "playlist"
parameters: ["repeat", "{{states.input_text.lms_p1.state}}"]
# LMS GUI Command for play playlist
- alias: "LMS GUI Play Playlist Command"
initial_state: true
trigger:
- platform: state
entity_id: input_select.lms_command
to: "play playlist"
action:
- service: script.turn_on
data_template:
entity_id: >-
{% if (states.input_select.lms_source.state == "lms") %}
script.lms_cmd_play_playlist
{% else %}
script.lms_cmd_play_playlist_spot
{% endif %}
# LMS GUI Command for add playlist
- alias: "LMS GUI Add Playlist Command"
initial_state: true
trigger:
- platform: state
entity_id: input_select.lms_command
to: "add playlist"
action:
- service: script.turn_on
data_template:
entity_id: >-
{% if (states.input_select.lms_source.state == "lms") %}
script.lms_cmd_add_playlist
{% else %}
script.lms_cmd_add_playlist_spot
{% endif %}
# LMS GUI Command for play artist
- alias: "LMS GUI Play Artist Command"
initial_state: true
trigger:
- platform: state
entity_id: input_select.lms_command
to: "play artist"
action:
- service: script.turn_on
data_template:
entity_id: >-
{% if (states.input_select.lms_source.state == "lms") %}
script.lms_cmd_play_artist
{% else %}
script.lms_cmd_play_artist_spot
{% endif %}
# LMS GUI Command for add artist
- alias: "LMS GUI Add Artist Command"
initial_state: true
trigger:
- platform: state
entity_id: input_select.lms_command
to: "add artist"
action:
- service: script.turn_on
data_template:
entity_id: >-
{% if (states.input_select.lms_source.state == "lms") %}
script.lms_cmd_add_artist
{% else %}
script.lms_cmd_add_artist_spot
{% endif %}
# LMS GUI Command for play album
- alias: "LMS GUI Play Album Command"
initial_state: true
trigger:
- platform: state
entity_id: input_select.lms_command
to: "play album"
action:
- service: script.turn_on
data_template:
entity_id: >-
{% if (states.input_select.lms_source.state == "lms") %}
script.lms_cmd_play_album
{% else %}
script.lms_cmd_play_album_spot
{% endif %}
# LMS GUI Command for add album
- alias: "LMS GUI Add Album Command"
initial_state: true
trigger:
- platform: state
entity_id: input_select.lms_command
to: "add album"
action:
- service: script.turn_on
data_template:
entity_id: >-
{% if (states.input_select.lms_source.state == "lms") %}
script.lms_cmd_add_album
{% else %}
script.lms_cmd_add_album_spot
{% endif %}
# LMS GUI Command for play song
- alias: "LMS GUI Play Song Command"
initial_state: true
trigger:
- platform: state
entity_id: input_select.lms_command
to: "play song"
action:
- service: script.turn_on
data_template:
entity_id: >-
{% if (states.input_select.lms_source.state == "lms") %}
script.lms_cmd_play_song
{% else %}
script.lms_cmd_play_song_spot
{% endif %}
# LMS GUI Command for add song
- alias: "LMS GUI Add Song Command"
initial_state: true
trigger:
- platform: state
entity_id: input_select.lms_command
to: "add song"
action:
- service: script.turn_on
data_template:
entity_id: >-
{% if (states.input_select.lms_source.state == "lms") %}
script.lms_cmd_add_song
{% else %}
script.lms_cmd_add_song_spot
{% endif %}
# LMS GUI Command for next track
- alias: "LMS GUI Next Track Command"
initial_state: true
trigger:
- platform: state
entity_id: input_select.lms_command
to: "next track"
action:
- service: script.turn_on
data_template:
entity_id: script.lms_cmd_next_track
# LMS GUI Command for pause player
- alias: "LMS GUI Pause Player Command"
initial_state: true
trigger:
- platform: state
entity_id: input_select.lms_command
to: "player pause"
action:
- service: script.turn_on
data_template:
entity_id: script.lms_cmd_pause_player
# LMS GUI Command for re-start of player
- alias: "LMS GUI Player Re-start Command"
initial_state: true
trigger:
- platform: state
entity_id: input_select.lms_command
to: "player restart"
action:
- service: script.turn_on
data_template:
entity_id: script.lms_cmd_start_player
- alias: Microwave On In Evening
trigger:
platform: time
at: '18:00:00'
action:
- service: switch.turn_on
entity_id: switch.microwave
id: '1519915869971'
- alias: Microwave Off at Night
trigger:
platform: time
at: '18:00:00'
action:
- service: switch.turn_off
entity_id: switch.microwave
id: '1519915933353'
- alias: Subwoofer Off at Night
trigger:
platform: time
at: '02:00:00'
action:
- service: switch.turn_off
entity_id: switch.subwoofer
id: '1519916269791'
- alias: Subwoofer On in Morning
trigger:
platform: time
at: '09:00:00'
action:
- service: switch.turn_on
entity_id: switch.subwoofer
id: '1519916312961'
- alias: First Person Home
trigger:
platform: state
entity_id: input_boolean.someone_home
from: 'off'
from: 'on'
action:
- service: ifttt.trigger
data: {"event":"iSmartAlarmOff"}
- service: switch.turn_off
entity_id: switch.bi_cameras
- alias: Last Person Leaves
trigger:
platform: state
entity_id: input_boolean.someone_home
from: 'on'
from: 'off'
action:
- service: ifttt.trigger
data: {"event":"iSmartAlarmOn"}
- service: switch.turn_on
entity_id: switch.bi_cameras
- alias: Gill Leaves Home (Asus wifi)
trigger:
platform: state
entity_id: device_tracker.android64082b6e603d76d9
from: 'home'
from: 'not_home'
condition:
- condition: state
entity_id: device_tracker.android28005555987cbc20
state: 'not_home'
action:
- service: input_boolean.turn_off
data: {"entity_id":"input_boolean.someone_home"}