My light automation was working fine till my Pi crashed and I had to rebuild it. Now I am using Hassbian with homeassistant 0.84.3 and I can’t get my light automation configured. I get the following error:
Error loading /home/homeassistant/.homeassistant/configuration.yaml: sequence entries are not allowed here
in “/home/homeassistant/.homeassistant/automations.yaml”, line 1, column 3
This is how my automation.yaml looks like:
[]- alias: Buitenverlichting aan na zonsondergang
trigger:
platform: sun
event: sunset
offset: "+00:15:00"
action:
service: light.turn_on
entity_id: group.buiten
- alias: Buitenverlichting uit
trigger:
platform: time
at: '23:30:00'
action:
service: light.turn_off
entity_id: group.buiten
- alias: Buitenverlichting ochtend aan
trigger:
platform: time
at: '06:00:00'
action:
service: light.turn_on
entity_id: group.buiten
- alias: Buitenverlichting ochtend uit
trigger:
platform: time
at: '08:00:00'
action:
service: light.turn_off
entity_id: group.buiten
Could it be that your service is ‘light.turn_off’ but the entity id is a group and not a light?
try switching your service to ‘home assistant.turn_off’
Althought I knew it would work, I tried it anyway.
I changed all the light.turn_on and light.turn_off to homeassistant.turn_on and homeassistant.turn_off.
This didn’t make any difference, there error is still somewhere in “/home/homeassistant/.homeassistant/automations.yaml”, line 1, column 3.
Can you highlight your code in the initial post and use the code blocks </> as per the instructions at the top of the page.
It makes it MUCH easier to spot any issues with formatting
Line1 column3 points directly to the square brackets, they shouldn’t be there
The automation starting
- alias: Buitenverlichting ochtend aan
is indented one space too many.
Incorrect formtting will kill your config and prevent it from running.
In your automations.yaml the -alias: should be at the very left hand side of the page. No spaces.
All the -alias: should line up under each other going down the page. Yours do not.
Try this one
- alias: Buitenverlichting aan na zonsondergang
trigger:
platform: sun
event: sunset
offset: "+00:15:00"
action:
service: light.turn_on
entity_id: group.buiten
- alias: Buitenverlichting uit
trigger:
platform: time
at: '23:30:00'
action:
service: light.turn_off
entity_id: group.buiten
- alias: Buitenverlichting ochtend aan
trigger:
platform: time
at: '06:00:00'
action:
service: light.turn_on
entity_id: group.buiten
- alias: Buitenverlichting ochtend uit
trigger:
platform: time
at: '08:00:00'
action:
service: light.turn_off
entity_id: group.buiten
I used your changed code and now the error is gone. I will see the result when the sun sets.
I didn’t even saw there was one space too many i it.
Thanks a lot.