I’m currently using arduino to control relays through out my house which i have currently working however, upon attempting to add a second switch home assistant throws up the error:
" Configuration invalidCHECK CONFIG
Error loading /config/configuration.yaml: while parsing a block mapping in “/config/configuration.yaml”, line 1, column 1 expected <block end>, but found ‘<block mapping start>’ in “/config/configuration.yaml”, line 92, column 2"
I’ve tried researching online and looking at similar forum posts but I’ve not been able to fix it.
Below is my configuration.yaml:
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: 0
longitude: 0
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: metric
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: UTC
# Customization file
customize: !include customize.yaml
# Show links to resources in log and frontend
#introduction:
# Enables the frontend
frontend:
themes: !include themes.yaml
# Enables configuration UI
config:
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
# base_url: example.duckdns.org:8123
# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
# Optional, allows Home Assistant developers to focus on popular components.
# include_used_components: true
# Discover some devices automatically
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
# Enables support for tracking state changes over time
history:
# View all events in a logbook
logbook:
# Enables a map showing the location of tracked devices
map:
# Track the sun
sun:
# Sensors
sensor:
# Weather prediction
- platform: yr
# Text to speech
tts:
- platform: google
# Cloud
cloud:
#Xbox
media_player:
- platform: xboxone
device: FD001DEF26E50A75
name: The Xbox
# Arduino
arduino:
port: /dev/ttyACM0
# Relay
switch:
platform: arduino
pins:
6:
name: Lamp
12:
name: Aircon
initial: true
negate: true
#Xbox One switch
switch 2:
- platform: template
switches:
xboxone:
friendly_name: Xbox One
value_template: "{{ is_state('media_player.living_room_xbox_one', 'on') }}"
turn_on:
service: media_player.turn_on
data:
entity_id: media_player.living_room_xbox_one
turn_off:
service: media_player.turn_off
data:
entity_id: media_player.living_room_xbox_one
#Ios
ios:
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml