Newbie - handling configuration.yaml - Home Assistent goes down

Newbie - handling configuration.yaml - Home Assistent goes down

It has made me very difficult to get my first configuration in the air, but with some forum help, I have managed to get a Sonoff Switch to work.

Now I try to add things to my configuration.yaml. It’s not that good.

My equipment is a Raspberry Pi with Hassbian 1.23 and a Windows PC
Have installed Samba so I can access my configuration.yaml from Notepad ++.

Just to try something I would like to add something to configuration.yaml.

There is a weather section

# Weather Prediction
sensor:
  - platform: yr

If I only add two lines, and restart via Putty with Sudo reboot, HA will not get back into the air.

Do I use Reboot from Configuration, the system sends a message: Why does not it work?

Instruction from link below:

# Weather Prediction
sensor:
  - platform: yr
    monitored_conditions:
    - temperature

After I add this, I perform a sudo reboot. But then HA does not come in the air.

I remove the lines again, then run it again.

Can I not use Notepad ++, or what’s wrong, can not figure it out? ? ? Very frustrating.

Hi @Bielefeldt, what shows the log if HA does not start?
cat /home/homeassistant/.homeassistant/home-assistant.log

1 Like

My guess from seeing previous people hit the same issue - do you have two “sensor” keys in your YAML? Multiple sensors get added as a list under “sensor”.

sensor:
  - platform: yr
    monitored_conditions:
    - temperature

  - platform: time_date
    display_options:  
    - 'time'
    - 'date'
    - 'date_time'

1 Like

maybe you did a “tab” instead of multiple spaces in Notepad ++, which leads to yaml language error ?

You can absolutely use notepad ++ for HA. This is what I have been using for more than one year now, without any problem.

1 Like
1 Like

Thanks at lot.

There was a “TAB” character in my configuration.yaml that caused HA to fail.

home-assistant.log:

2017-05-25 14:24:52 ERROR (Thread-1) [homeassistant.util.yaml] while scanning for the next token
found character '\t' that cannot start any token
  in "/home/homeassistant/.homeassistant/configuration.yaml", line 60, column 1
2017-05-25 14:24:52 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: while scanning for the next token
found character '\t' that cannot start any token
  in "/home/homeassistant/.homeassistant/configuration.yaml", line 60, column 1

Thanks for all the help and inspiration, it is of great benefit.

1 Like

hahaha, no problem. I am always glad to help, especially as I did the exact same mistake when I first started with YAML :smiley:

1 Like

I copy/pasted some config from a github repo and it left some spaces at the end. That caused the same issue.