looking for a few pointers if you don’t mind… i’m new to all this and i’m trying to write my first automation but failing miserably… here is whats going on…
started with hass.io about a week ago… got help to set up my broadlink RM pro+ and set up both RF and IR remote controls in HASSIO
all that is working fine…
now i’m trying to automate two lamps on RF sockets to switch on when the sun sets ( i’ll work on tweaking it to offset and stuff once i work out the basics). I tried using the Automation tab in Hass.io though since the update there is nothing there… so i tried to enter the following into my automations.yaml
alias: turn on lounge lamps at sunset
initial_state: true
hide_entity: false
trigger:
platform:sun
event: sunset
action:
service: switch.turn_on
nothing happend… i was expecting to be able to se it on the over view page but nothing… so i removed it from there and went direct into the configuration.yaml with this…
automation:
alias: turn on lounge lamps at sunset
initial_state: true
hide_entity: false
trigger:
platform:sun
event: sunset
action:
service: switch.turn_on
now when i check the configuration i get this message
Configuration invalid
Error loading /config/configuration.yaml: mapping values are not allowed here in “/config/configuration.yaml”, line 78, column 10
line 78 is " event: sunset"
the last time i had a problem it was due to capital letters… so i have gone through and ensured there are non this time… what else am i missing? what have i done wrong?
i looked at yours and noticed i had event and platform in the other order so i re-ordered them… i also added “-” and altered my indenting (also missed a space)
now i have this
automation:
alias: turn on lounge lamps at sunset
initial_state: true
hide_entity: false
trigger:
- event: sunset
platform: sun
action:
- service: switch.turn_on
entity_id: group.all_switches
the config checker says its ok… but the overview page says
None of my automations are working, after I upgraded to the latest version. If I visit the automations page, I can see all of them, but I cannot edit them. (Then I get an empty page)
I think you might have the same problem.
that sounds like what i have yes… so it could be a bug…
as im new to hass.io i wasnt sure if it was something i done wrong… though i would think that even if the automations gui isnt working, a manually entered automation should have worked… however. i know nothing about this lol
i’m just about to try editing to the homeassistant.turn_on and see if that does anything…
My automations stopped working after the update, so I do not think that manual automations will work.
I am surprised to see that the bug is registered like javascript errors, because that does not explain why my automations stopped working.
All of my automations are hangout messages, so maybe this is another bug in this version?
Hey,
I also needed a long time to get my light with sun level automation to work, so i share mine - perhaps it helps. i use the elevation of the sun as trigger so i can get the lights going on a bit before sunset, not the perfect way but it works:
In your first post your second bit of automation code the problem was that you had “platform:sun” (no space between the : & sun). That’s why it was giving you the mapping error there.
And you didn’t have an entity for the action.
Later on you had too many spaces under automation: as pointed out above.
You have extra code in your condition: that you don’t need. You can remove the “or” statement since you only have one condition: