Hello Home Assistant Community,
I’ve looked over the website in detail, read through everything suggested on YAML, and I think I’m lacking some kind of base level of understanding. I’m looking for some additional guidance on what I’m missing, but failing that, I’ve got a bunch of suggestions on how to improve the home-assistant website documentation to be more friendly to noobs like myself. I really like Home Assistant and it looks like it’ll be really flexible and powerful, but only after I clear the first hurdle of understanding its syntax.
What I’ve already tried
After some digging on the website (troubleshooting pages should probably be a link in the top), I stumbled on the Home Assistant troubleshooting configuration page here. It’s a good overview of what YAML is, but doesn’t really tell how to use it within Home Assistant. Here’s what I mean:
-
The first example of a collection is nice, but not really useful. Why does it say
- hello - how - are - you
"? What does that mean in the context of home-assistant? It’d be more helpful if you showed a list of actual items that might be used within Home Assistant, likeLiving_Room_Light
,Hallway_Light
, etc. -
The second example also doesn’t mean anything within the context of Home Assistant. I’m also not 100% sure what it’s trying to get across. There’s a comment saying the first
beer:
will be ignored because it’s specified twice, but again, why use beer? Also, whyice cold
and not justcold
in that situation, like it listswater:
below? What does this teach me about Home Assistant? It’d be far more useful to show an example using theLight
function, and specifyingBrightness:
twice, adding in a comment that Home Assistant will ignore the firstBrightness:
-
The third example, showing nesting mappings, is a lot clearer in some ways but more difficult in others. It shows how to indent, but it doesn’t tell me why you would indent, and what situations you’d indent in. The text above the sample says that indentation is important in specifying relationships… which feels a lot like saying “don’t mess this up” and never specifying what “this” is or how it can be messed up.
-
The fourth example gives a bit more of an overview, but it’s meaningless to someone unfamiliar with MQTT. Even to people who know it’s a messaging protocol, it’s still not really clear what the relationship is between
state_topic
andsensor
, or why one would be part of the other. This is made more confusing by the hyphens in the list, which push the eye into believing theplatform: mqtt
statement is on the same level asstate_topic:
I’ve also looked at the links suggested for additional reading below this, and they make even less sense to me. YAML Idiosyncrasies seems like it could be really useful to someone with more experience, but assumes a base level of understanding and vocabulary I don’t have. The two YAML parsers are the same way - this looks like it’d be useful if I knew more about python, but I installed python specifically for Home Assistant, and then spent 2 hours figuring out what the heck pip was, so I’m not the target audience here. (side note: the HA website is much, much better at explaining this now than it was when I installed python originally)
This brings me around to my biggest question: In the context of Home Assistant, and YAML, what are platforms and components? When do you use one over the other? Why would you call one using platform:
in some cases, but other cases just list it directly? There’s a list of components on the website, but sometimes a component (like Lights
or Switch
) contains another component (like Phillips Hue
or Belkin
) and sometimes a component is referred to as a profile in the documentation and called as a platform:
in YAML. This relationship between these things doesn’t seem consistent, and it is really hard to just wrap my head around.
Thanks for reading the wall of text, hope some of this was useful, and want to say thank you again to everyone who has contributed to Home Assistant!