I am vry new to Homa Assistant, and am digging into using trigger template sensors for something I want to achieve.
I learned that these cannot be added via the UI (yet?) and have to be added to configuration.yaml, so I searched for how to edit this file (was not easy to figure out how to do that, so perhaps a but more documentation on that might help.
So, I installed the VS Code app, and had a bit of a look-see - and to my dismay I see plenty yaml schema violations in my rather short configuraitons.yaml as well as my automations.yaml! Given that I have never ever touched either YAML file before, I am rather concerned that either the UI does not produce proper yaml as required by the schema, or the schema is outdated, or both, possibly leading to the system breaking and misbehaving at some point.
As a side note, I know that UI-created templates are in a hidden folder somewhere, and that custom templates need to be added to configuration.yaml or better an extra file templates,yaml which I need to imprt like the others - but I don’t know what side effects that might have as regards the hidden templates.
Wouldn’t it be better to have either template (manual or UI-generated) right from start in a templates.yaml file?
On a side note, (and not to get too far ahead of where you are), there’s this feature called Packages which allows you to have essentially multiple configuration.yaml files. What I like is that you can then have one file (or directory of files) where all the code related to a single function is located. I have all templates, helpers, automations, scripts for things like HVAC, Security, Irrigation, Solar, Weather, etc. all grouped together. My automations are much simpler in packages and I also put my packages in github to track changes. YMMV, of course.
On a side note, (and not to get too far ahead of where you are), there’s this feature called Packages which allows you to have essentially multiple configuration.yaml files. What I like is that you can then have one file (or directory of files) where all the code related to a single function is located.
Very cool - I played around with it and got it to work using !include_dir_named and then (for now) one yaml per solution - ideal for what I need at the moment!
As an unexpected consequence I am now pulling all UI-based helpers and automations into solution-oriented packages
Just need to get used to YAML, especially lists… (I never really liked it in my professional life…)
Puzzle pieces are falling into place, and the steep learning curve now starts to feel like skiing on pristine powder snow…