I recently split up my configuration.yaml file into many sub folders and they all worked fine except for my sensors.yaml folder. All these modules were a complete copy and paste from my working configuration so it was a little confusing as to why it’s all of a sudden throwing an error.
Feb 09 16:22:49 raspberrypi hass[31709]: ERROR:homeassistant.util.yaml:Unable to read file /home/hass/.homeassistant/includes/sensor.yaml: 'utf-8' codec can't decode byte 0xb0 in position 1191: invalid start byte
I eventually figured out that it was the ° symbol in the below that caused the error, even when it was commented out…
I have no idea, but I’ve tried recreating the file, putting it in double quotes (like your example), commenting the line out and it throws the same error every time…
As soon as i remove it or copy the exact same text back into the configuration.yaml it works fine again.
The reason is that you didn’t save the file with an UTF-8 encoding, so python can’t decode the character.
You can use iconv to change the encoding.
Sebastian
EDIT: as a warning: do not try to redirect the output of iconv to the file it reads from.
That will most certainly remove all the contents from the file. Speaking from experience…
Couldn’t figure out how to use iconv, didn’t accept the ansi: iconv -f ansi -t utf-8 sensor1.yaml > sensor.yaml
But I’m using Windows to make the changes and found that I can make notepad ++ do this automatically in the future with this: