First off, super noob here, got my first bulb yesterday! So here’s my automations.yaml. I set it up in the GUI config but when my sunset automation didn’t trigger I adjusted them to work on a timeframe to see if they’d work that way to no avail. Have you guys got any suggestions on things I may try to get these automations working properly?
Hey @DavidFW1960, that’s correct I was just using that middle one to test after the automations didn’t go off, but I’ll edit it above to show my original. Thank you.
It looks like you may have manually added some lines and got the indenting incorrect. I think the first one should be this, assuming you want to use “light.turn_off” in the morning. All indenting should be only 2 spaces for yaml.
Thanks Bosborne, Rise and Shine worked perfectly this morning and I stuck around to make sure they got turned off afterward too and it worked great! Thank you guys
that’s not entirely correct…some subsections may need indented two more spaces.
I’m kind of surprised that it worked as you have it since the docs say you need to have the stuff under “data:” indented by two more spaces as you had it originally.
Y=In your example, all indentations were 2 spaces. Each level is indented 2 spaces more than the one above.
You are correct. I thought it needed to be 2 spaces. I just checked the YAML specification. The indentation needs to be consistent though and there were a mix of 2 & 4 spaces in the first item. There are some enterprise software products using YAML that insist on 2 spaces.
compare that to the way it was written in the first post and you’ll see that the only difference is that the “service:” call is moved to the bottom but aside from that all of the indentation is the same (a mix of two and four spaces).
You forgot the "- " before data. That shifts data & below 2 more spaces.
Adding the missing dash & space, the level below should line up with the d in data.
No i didn’t. It isn’t supposed to have a dash in front of it.
the - is there to denote a list of something. in this case the list is of service calls. The service calls include a data config. So the data above is part of the service call. If I add a - in front of data the parser will think I’m starting a new list entry and give an error because i didn’t give any data for the first service call.
look at the link I posted above for the light component.