On another note, I swear I will never understand the formatting of this stuff. For example, under âcard:â, those items have to have a hyphen in front of them. Under âservice_data:â, those items donât have a hyphen. I never know what Iâm doing unless I can find an example somewhere.
Your answer and thomasâs excellent yaml tutorial is very helpful for people learning yaml, but what keeps the confusing going is how Home Assistant parses the data (whether the - is implied or not).
For example, you have the ui editor and the raw editor in lovelace and the code you enter is different depending on whether you enter it in the code editor or in the raw editor. The same is true with the automation editor or if you use a file editor. For novice users learning home assistant, it makes it very difficult to try and figure out how the code should be formatted.
Other problems I have had has to do with how the !include works.
The different ways to use it are defined in the doc file
Again, a user needs to code the yaml file differently depending on how it is loaded from the configuration.yaml file.
So beside learning yaml (which is a must) a user must learn how HA inconsitently handles yaml statements. Most of my errors (and there has been a lot) was not that I didnât understand that it was a list or a dictionary, it was that I didnât understand how Home Assistant would take the file I created and reformat it.
Also which docs are you referring?
No it is not that simple. Try creating a new card (non Lovelace mode) paste the same code in a create, manual card and in the raw editor. You will see that the user does not need the hyphen in the manual card ( implied) and does in the raw editor.
but thatâs apples an oranges⌠the top level card in a manual card creation is the top level object⌠where as itâs not the top level object in the non-lovelace mode.
when viewing the whole setup⌠your context is this:
when you create a manual card your context is thisâŚ
I donât think so. I believe this is what causes most of the confusion to new users. On the screen it says edit as yaml. It doesnât say edit as a top level or any other level. I reading it think yaml is yaml. I think your map will be helpful.
Why isnât the hyphen needed on the manual card?
If a document could be created showing where the contents are placed depending on where and how a user creates the contents I believe this would help a lot of users.
I guess for long time users this concept is very clear. To me until you just explained it just now I had no idea what was going on. I was told that the hyphen was implied, etc. Anyway, I have tried to move as much as possible to yaml only and not use any other editor. It least until I am much more proficient I can enter the yaml code with dic, list etc and understand how the spacing should work.
Is there a similar explanation to each of the !include options?
This is a perfect example. I now see also the spacing is taken care of for you. This is why I was having difficulties switching between the raw editor and the manual card creation. I had no idea what HA was doing. Maybe you can attach this to the official docs so others can gain from your knowledge?
I have. What I was trying to do was was split my configuration in to several different files and folder locations to get it better organized. I was not understanding that I could not just cut and past my existing yaml file and save the code into a new file. Your explanation is far better (to me) than this document. I was having difficulties understanding how HA was using the new file. This created errors because of my spacing and hyphens.
Thanks for all your help. I am very close to âgetting itâ now. You referenced a document above that about object list and object. What document are you referencing?