I think I messed up my configuration.yaml file. I am new to all this and before I messed around with trying to add a switch I could open HA through my browser and see what HA had discovered. Now I get a this site can’t be reached error. I am trying to get google home to change the channel to Disney through a broadlink rm 3. Here is my config.yamil file contents. Any help is appreciated.
Did you delete the # before a bunch of the lines? Or are they just not showing for some reason? A # designates a line that will be ignored. Deleting them can throw everything off pretty quick.
Take a look at the log, what errors are showing?
2017-07-22 01:17:11 ERROR (Thread-1) [homeassistant.util.yaml] mapping values are not allowed here
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 71, column 11
2017-07-22 01:17:11 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: mapping values are not allowed here
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 71, column 11
I think it’s just an indentation issue. The error tells you where to look. Indentation matters in YAML.
switches:
- platform: broadlink
host:xxx.xxx.x.xx
mac:xx:xx:xx:xx:xx:xx
timeout:15
comcast:
friendly_name:"disney"
command_on: ‘JgBQAAkbCTYJFglaCSgJKAolB1YJAAGoCBwJSAkXCBcIGAgpCBcJFwkACmsJGwk2CBcIWwgpCSkJJAhWCQABqAkbCiMIOwkXCRYIKwcYCBcIAA0FAAAAAAAAAAA=’
Looks like just a few spacing issues. try.
switch:
- platform: broadlink
host:xxx.xxx.x.xx
mac:xx:xx:xx:xx:xx:xx
timeout:15
switches:
comcast:
friendly_name:"disney"
command_on: ‘JgBQAAkbCTYJFglaCSgJKAolB1YJAAGoCBwJSAkXCBcIGAgpCBcJFwkACmsJGwk2CBcIWwgpCSkJJAhWCQABqAkbCiMIOwkXCRYIKwcYCBcIAA0FAAAAAAAAAAA=’
Switch is the component. It gets no indent. Anything under it starts with two spaces of indentation. From there you can follow the example given for the platform. Pay close attention to spacing and indentation.
Im new to all this. What is the proper indentation? Thanks.
I tried your code and when I try and open home assistant in browser I get:
This site can’t be reached
192.168.1.30 refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
The spacing from the left for each line. Super important in Yaml.
What is the log saying now? Sounds like ha couldn’t start? Did you copy paste my example? Does switch start at the left with 0 spaces?
This is my file for the same thing.
https://github.com/SilvrrGIT/HomeAssistant/blob/master/switches.yaml
I don’t know if this is just a result of the copy and paste, but in the example not only is the indenting off on almost every line, but all of the comments (#) indicators have been removed.
For example:
Name of the location where Home Assistant is running
name: Home
Should be:
#Name of the location where Home Assistant is running
name: Home
I’ve already tidied this up for you on your reddit thread.
Thanks. I appreciate it.