WTH Do I still need to be a rocket scientist to get things done in HA

12? really?

People really need to start upping their HA game and start using it for what is designed to do - automating. I mean it’s literally right in the name!

:sweat_smile:

I literally have hundreds of automations and scripts.

or maybe it’s just me.

:confused:

I hear the first step to recovery is admitting that you have a problem.

:wink:

The number of automations doesn’t tell you anything about how often people tinker with the ones they have. Or how often people do the same with scripts, integrations, devices – all things that live under Settings and can’t be added to the sidebar menu. HA probably has some internal stats on how often certain menu items are accessed (that are much more descriptive that “number of automations”) and hopefully they are using this to inform future UX decisions.

Based on the Analytics docs no such UI or Dashboard stats are part of the data that is currently gathered.

1 Like

It does.
If the average is 12 and there are people here with hundreds of automations then that must mean a large chunk of installations has 0 automations.
That is how average work.

3 Likes

This. Absolutely.

I’m slowly getting to grips with HA as I have some time to work on things at long last for personal reasons… but it’s been a massively frustrating experience.

It’s an easy path to take that “everyone understands this”, but even finding out where to edit configuration.yaml and what needs to go in there seemed to take longer than it should do, and the structure of YAML needed to adapt any dashboard can be difficult to understand particularly when the examples given (both in the documentation and other times in threads on here) are incomplete or lose their indentation because they’ve been broken up into blocks for reasons of explanation.

Despite claims earlier on in the thread, fluency in Python does not equate to the same in YAML - I’m a pretty decent python coder (I’ve created some large systems which are still in use years later), but YAML is inpenetrable to me. Yes, they both use indentation but it’s far easier to parse mentally in Python, particularly where the syntax is not clear - which is the biggest issue for me.

I haven’t found any definititve resource which says what is acceptable for any given blocks/mappings. The HA documentation on it [1] is not very helpful and relies on implicit knowledge. And there is a huge lack of simple, worked examples with ‘this is the code you need and this is what it will look like’ in a lot of places. It reminds me of Django’s documentation which makes it difficult to find the actual API reference (which is what you need once you know what you are looking for) and I’ve not found that - to my mind there should be a tree-like documentation structure which allows looking up (say) what is below views: or any other YAML, so you know what is currently implemented.

The editor in HA leaves a lot to be desired, IMO - the feedback is difficult to parse, and an upgrade to something more dynamic here would help, plus the possibility to revert to the previous successfully-saved version at a single click when you’re 8 attempted saves deep and you’ve still not fixed the issue. I’m finding the only way to be less frustrated is by using an external editor and saving the last version in that… which is really sub-optimal. There may be a good replacement for it (or working remotely in VSCode) but again, defaults are important, particularly if you are a beginner.

Don’t get me wrong, when things work it’s great! But there’s so much that you need to do in YAML if you want to get beyond the basics, and this area is largely impenetrable without gaining skills in multiple areas simultaneously.

And that is not a good recipe for learning. I was a classroom teacher for 30 years, and judging by what I’ve been told recently, I was pretty good at it. And giving simple, workable examples which are explicit and complete is important as that scaffolds the learning that people need to get really into this. Without it, the community is losing people who could be brilliant at this. But if you spend 2 hours wrestling with something and getting nowhere, there are a lot of people who will just give up, maybe for weeks, months or even forever.

And having been one of those people who died on the hill of ‘Programming the Z80’ by Zaks in the 80s because I didn’t have the talent of Matthew Smith, I know that it can take decades to get back into an area. Particularly if the first comment you get when you’re frustrated and asking for help is along the lines of “Home Assistant may not be for you”.

I would love to produce such documentation, but I’m short on time (I have a terminal cancer diagnosis, hence my spare time), and I don’t have the YAML knowledge yet to produce anything anyway. What I’ve learned over painful sessions over the last few weeks has transformed my HA installation, but I’m bloody-minded sometimes and really want to get things working.

I also think there seem to have been a lot of breaking changes in the YAML API given some of the older examples I’ve seen don’t work any more, but I’ve not really looked at that in detail.

No flames please, all my opinion. I love HA, but YAML is not friendly, and a lack of a live-editor which shows what’s wrong, and a lack of API reference makes it much more painful than it should be.

[1] - YAML syntax - Home Assistant

2 Likes

If you know data structures and Python, you can learn yaml in 10 minutes by passing Python data structures to yaml output. Also, if you know json, yaml is json without termination characters. You can use online json to Yaml tools(and vise versa) to pick up the finer details. Lastly, when you know that, you won’t even need examples because the documentation covers what structure is allowed (configuration variables sections)

3 Likes

Do you count the many people who abandoned overly complicated YAML automations in favour of much more user friendly NodeRed Automations as having “zero” automations? Because if so, your statistics are quite wrong.

I have two HA installations and in neither of them a single YAML-based automation, yet dozens of extremely complex NR automations. I coudn’t even start to comprehend how I could do these things in YAML and honestly, why would I bother, when there is NR?

But really - if you “just” want to automate things, NodeRed is so much more user friendly and easier to learn for someone without coding experience.

I ran NodeRed without HA for about 2 years. The only reason I reinstalled HA was because I wanted nicer dashboards, cloud access and a more unified management for devices - the automations part i still do in NR.

I have been recommneded a HA to set up relatively simple heating scheduler for a church. One issue I face is how will this be supported when I move on? If it’s all as complicated as this thread suggests the first time after my time that it keels over will result in it being scrapped as no one will be able to understand how to fix it.

It’s not complicated, post your devices and such when you get started and it will be an easy fix.

1 Like

Don’t know.
You need to look in the source code of HA what it counts.
Most likely it does not count Node red.

But that wasn’t the topic of that post.
Read the previous post and it will make sense for you

No one is stopping you. All power to node red users.

Yes but likely my successors won’t understand code etc so will be stumped. I don’t even know what “post your devices” means yet so how will they? It’s not like a Hive heating controller say where there are milions of them out there all basically identical and well supported.

That’s not my experience. I tried it and found it cumbersome. But I don’t like the HA UI either so there’s that. And I will say again that I don’t think I’ve ever been in a situation where “an automation is too complex for yaml” either.

Typically if automations become extremely complex then they are much harder to fix if something goes wrong or they are harder to modify as requirements change unless they are extremely well documented. I assume it would be the same in NR as well? And I’ll caveat that by clarifying that “extremely complex” is in the eye of the beholder.

But everybody has their own preferences and it’s good to have choices.

5 Likes

That means you have some physical devices that is connected to Home Assistant.
Each of them have a name, an entity_id and possibly a friendly name.
The best is to post the entity_ids of those devices you want to create an automation with.

But as you wrote if this is so complicated, why would this thread only have 26 votes? And the forum thousands of users? And hundreds of thousands of installations?
It’s a very smal group of people that vote in these threads and most of them have not given it a chance

1 Like

Well yes, the more complex things get, the more complex they are to maintain / debug. I think that goes for any system.

There isn’t really a way of documenting in NR, but it is node/flow-based, the individual nodes tell you what they are currently doing (little badges below the node) and there is a debug window that lets you monitor data streams for selected Nodes. All that makes it (to me) rather easy to understand whats going on. Sometimes I get stuck too, but until now I always found solutions by myself.

YAML in comparison is just complete gibberish to me and while the Editor supposedly tells you if something is wrong with your code, in my eyes it does a really bad job at helping you fix stuff. There is no way of seeing whats happening or not happening, stuff just doesn’t work and I have no idea why. I have not written a single thing in YAML without having to come to this forum to ask people for help.

For me personally NodeRed is much, much easier path since I’m a visual person. But I guess if one is well versed in coding, YAML can be a great tool too.

Amazing explanation and so true!

So sorry to hear about your circumstances - live life to the fullest! :heart:

1 Like

If it’s something that’s simple and just done in HA without any extra addons (particularly from HACS) then you should be OK in terms of it keeping working. BUT I’ve seen quite a few changes which appear to be breaking over time, and you’d need someone to be clued up to a degree (or just never update the system which is always a viable option!).

I’m spending time with my wife going through what I’m doing as fortunately she enjoys the control and power this is giving her, but it’s a steeper learning curve for her as while she was a very good ICT tech, she’s not a programmer, and changing YAML will not be an option for her.

My advice for you is to document what you’ve done, with notes and videos, and describe everything you do when you do it. The two biggest issues with documentation (and I see it a lot in these areas) are:

1) Assumption: Assuming that the person you are talking to knows everything you know. This happens so often I’ve lost count. Explain everything a bit slower, and don’t jump about. Go through in an orderly manner, with each step taken a little slower than you think is necessary.

2) Jumping Ahead. This happens so often - perfect example I found yesterday in the HA docs (can’t find it now though). The first example is simple (a single definition of a layout)… and the second one introduced three new concepts in a single step. No explanation, just “and here’s (whatever)”. That’s not how you get people to be confident. Yes, the smart kids in the class can skip-read or grok it straight away, but in my experience, 80% of people are not at that point, and the 20% who are assume everyone else is as clever as they are.

Avoid those two in whatever you leave for whoever has to do it after you, and you’ll be all good, i reckon.

I think you’re making an assumption here which doesn’t stand up for me. I think survivorship bias comes into who actually spends time in here, and people voting for forum posts may not be representative of actual opinion across the entire cohort of people who’ve installed HA. There are plenty of threads I’ve found on reddit which have been similar, plus a lot of help has been on there with useful assistance.

I’ve given it more than a chance - as mentioned in my original thread, I’m a reasonably competent Python programmer, and I’ve made some fairly complex projects. I love the potential of HA, but I think the documentation (particularly the lack of proper API documentation) means that it’s more frustrating to get into than it should be. Combine that with YAML, an editor which is not helpful and sometimes cryptic error messages (such as when you have valid YAML but the config isn’t right) then it makes for a pretty unfriendly experience.

For instance, imagine if the editor had code suggestions as you typed (a la intellisense in VSCode). Then you would have an idea as to what is appropriate for whatever you’re typing - even if you don’t know what to put in, you’d know some of the options straight away. Or if the raw config editor showed indentation lines in it. Etc…

Yes, there are people who can code YAML in their sleep using vi or emacs. But that’s a vanishingly small part of the population. Aside from having other things to do, there’s a reason why my HA install was effectively dormant for 3 years, and that was the sharp edges I banged against when trying things out for the first time. I think there are a number of reasons for this, as outlined above, and for me they conspire to make the experience one that I’ve seen time and time again make people think they aren’t up to a task and walk away from it.

It still has 5800 views. That is significantly more than 26.
And why would there be hundreds of thousand of installations updating every month if it was so hard?
Do you see the illogical with what you are saying?

I’d say it’s very few that need the HA API when they are new.
But even then I believe the documentation is pretty good. (Although I have not tried the API myself).
But there are sample codes on each endpoint.
REST API | Home Assistant Developer Docs

Combine the API with yaml? Why? If you use the API then that is for use outside HA? Or are you using the API inside HA? Why?
It just don’t make sense.

All error codes in programming is to some extent cryptic.
Such as when you make an error on line 1 you sometimes get the error on line 2. That is how errors work in programming. I have never seen a programming language in plain text what is the problem at the exact position. Feel free to show me such.

It can only validate the yaml, it can’t validate that your config is correct since it does not have that ability.
It’s just a json validator. A json validator can’t know if the rest of the program works.

It does with entities.
But since yaml configuration is becoming less and less of a thing then there is no need to create such a tool in my opinion.
Several years ago, then I could see that as a thing, but now there is so little you need to do in the text editor that there is no need at all.

Agree. And I would not count myself in that group.
But I have enough experience that I know that yaml is just json, and if I know json then I also know yaml.
Templates on the other hand is just another programming language to me and just needs a few weeks of practicing.

1 Like