Restart failure: ERROR while parsing a block mapping

How to fix this error? I’ve been looking at the same text for too long to notice.
Line 86 refers to automation block.

2017-12-06 16:49:27 ERROR (Thread-2) [homeassistant.util.yaml] while parsing a block mapping
  in "/home/homeassistant/.homeassistant/configuration.yaml", line 86, column 5
expected <block end>, but found '<block mapping start>'
  in "/home/homeassistant/.homeassistant/configuration.yaml", line 89, column 7
2017-12-06 16:49:27 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: while parsing a block mapping
  in "/home/homeassistant/.homeassistant/configuration.yaml", line 86, column 5
expected <block end>, but found '<block mapping start>'
  in "/home/homeassistant/.homeassistant/configuration.yaml", line 89, column 7
#Restart & Debugging
#sudo systemctl restart home-assistant@homeassistant && sudo journalctl -f -u home-assistant@homeassistant
#
#
#
homeassistant:
  name: !secret name_UI
  unit_system: metric
  latitude: !secret home_lat
  longitude: !secret home_lon
  elevation: !secret home_elev
  time_zone: !secret home_time_zone

#introduction:
frontend:
config:

http:
  api_password: !secret http_password
#  Uncomment this if you are using SSL/TLS, running in Docker container, etc.
#  base_url: example.duckdns.org:8123

# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
#updater:
#  include_used_components: true
#discovery:
#conversation:
history:
  include:
    entities:
      - sensor.temperature
      - sensor.humidity
      - calendar.sauna
      - sensor.heating_alarm
      - sensor.kalenteri_event_offset_reached
#calendar.contacts calendar.holidays_in_finland calendar.week_numbers calendar.tapulinkotitonttugmailcom
#logbook:
#map:
#sun:
#tts:
#  - platform: google

#group: !include groups.yaml
#script: !include scripts.yaml
#automation: !include automations.yaml"

#automation:
#  - alias: Heatup
#    hide_entity: True
#    trigger: 
#      - platform: state
#        entity_id: states.calendar.Sauna
#        state: On
#      offset: '-00:30:00' # event triggers 30min before... maybe? ... atleast if you add !!-30 to calendar reservation subject line



#account details in /home/homeassistant/.homeassistant/secrets.yaml
google:
  track_new_calendar: true
  client_id: !secret google_oauth_id
  client_secret: !secret google_oauth_secret
panel_iframe:
  sauna_reservation_calendar:
    title: 'Sauna varaukset / Reservations'
    url: !secret calendar_embed_code
    icon: mdi:hot-tub

automation:
  - alias: Heatup
    hide_entity: false
    initial_state: 'on'
    trigger:
#      platform: state
#      entity_id: sensor.heating_alarm
      platform: time
      minutes: '/1'
      seconds: 00
    condition:
      condition: state
      entity_id: calendar.sauna
      state: 'on'
    action:
      - service: switch.turn_on
        entity_id: switch.saunan_lammitys
  - alias: Cooldown
    hide_entity: false
    initial_state: 'on'
      platform: time
      minutes: '/1'
      seconds: 00
    condition:
      condition: state
      entity_id: calendar.sauna
      state: 'off'
    action:
      - service: switch.turn_off
        entity_id: switch.saunan_lammitys

sensor 100:
  - platform: template
    sensors:
      heating_alarm:
        value_template: '{{ states.calendar.sauna.state }}'
      kalenteri_event_offset_reached:
        value_template: "{{ states.calendar.sauna.attributes.offset_reached }}"
#      heating_alarm3:
#        value_template: '{{ states.calendar.sauna.attributes.start_time }}'
#      heating_alarm4:
#        value_template: '{{ states.calendar.sauna.attributes.end_time }}'
#      value_template: "{% if is_state('states.calendar.sauna', 'on') %}true{% endif %}"

mqtt:
  broker: localhost
  username: !secret mqtt_username
  password: !secret mqtt_password
  protocol: 3.1 
  keepalive: 60

sensor 1:
  - platform: mqtt
    name: Lämpötila
    state_topic: "sensor/temperature"
    qos: 0
    unit_of_measurement: "ºC"
sensor 2:
  - platform: mqtt
    name: Kosteus
    state_topic: "sensor/humidity"
    qos: 0
    unit_of_measurement: "%"
sensor 3:
  - platform: mqtt
    name: "Power Source"
    state_topic: "/sauna/rele/monitor"
    qos: 0
    unit_of_measurement: "SAUNA"

sensor 4:
  - platform: mqtt
    name: "Sauna lämpee"
    state_topic: "/sauna/rele1/confirm"
    qos: 0
    unit_of_measurement: "0/1"
switch 1:
  - platform: mqtt
    name: "Saunan Lämmitys"
    state_topic: "/sauna/rele1/confirm"
    command_topic: "/sauna/rele1/set"
    payload_on: "1"
    payload_off: "0"
    qos: 0
    retain: true
  
#switch 2:
#  - platform: mqtt
#    name: "rele 2"
#    state_topic: "/sauna/rele2/confirm"
#    command_topic: "/sauna/rele2/set"
#    payload_on: "1"
#    payload_off: "0"
#    qos: 0
#    retain: true

#switch 3:
#  - platform: mqtt
#    name: "rele 3"
#    state_topic: "/sauna/rele3/confirm"
#    command_topic: "/sauna/rele3/set"
#    payload_on: "1"
#    payload_off: "0"
#    qos: 0
#    retain: true
  
#switch 4:
#  - platform: mqtt
#    name: "rele 4"
#    state_topic: "/sauna/rele4/confirm"
#    command_topic: "/sauna/rele4/set"
#    payload_on: "1"
#    payload_off: "0"
#    qos: 0
#    retain: true

#switch:
#  platform: command_line
#  switches:
#    vanha_rele:
#      friendly_name: Vanha rele
#      command_on: "/usr/bin/curl -X GET http://192.168.1.117/digital/14/1"
#      command_off: "/usr/bin/curl -X GET http://192.168.1.117/digital/14/0"

I think you are missing a trigger: line

  - alias: Cooldown
    hide_entity: false
    initial_state: 'on'
      platform: time

should be

  - alias: Cooldown
    hide_entity: false
    initial_state: 'on'
    trigger:
      platform: time
1 Like

This fixed that. Thank you.

1 Like