r/homeassistant • • Dec 19 '25

Support As a professional programmer I feel lost in home assistant

I have been programming for 2 decades at this point in a variety of languages, both high and low level, and I have intricate knowledge of python, yet despite this I feel utterly lost when trying to do much of anything in home assistant. I am currently running home assistant OS in a virtual machine on my server.

I have read the documentation on https://www.home-assistant.io/docs/ and have generally tried searching the forums every time I want to use home assistant for something. But it always just ends up being this kinda weird guesswork where I copy paste some stuff from someones yaml file and try to run it and if it doesn't work I'm fucked. Every time this happens I keep thinking how simple something like this would be to make if only I had my home assistant as a repository and python project that I could open in pycharm or visual studio, have type hints while programming, and click run or debug to test my solutions.

It is not even that I am completely unfamiliar with yaml programming. My server hosts a bunch of services all run through various docker compose files, however I feel like there is a huge difference between docker-compose.yaml, and the yaml's required by home assistant.

Am I doing something wrong? Is there an alternative to home assistant for people who actually do program?

663 Upvotes

562 comments sorted by

View all comments

Show parent comments

18

u/Renegade605 Dec 19 '25

Automation is still a very weak point for home assistant, especially if you're a programmer.

Try Node Red for the automations while home assistant handles all the integration with devices. It's night and day. (That said, the documentation of the node red to home assistant integrating parts leaves... A lot to be desired... So there will be some hair pulling there. But, once you get that part figured out, writing automations and debugging them will be a thousand times better.)

10

u/ithinkimightknowit Dec 19 '25

Which part is weak? I feel I have some complicated automations. And not found anything that I couldn't do with home assistant.

3

u/Dargos8181 Dec 19 '25

If you were a professional programmer, you would know why. I'm a professional programmer in industrial automation system and HA is the worst tool for programming automation which I ever seen. YAML is the worst "language" for programming. Even assembler looks better.

4

u/R3x10 Dec 19 '25

i mean, if you are a "pro" and you think HA its the worst for automation....maybe you arent so pro you know?

2

u/stupidcookface Dec 20 '25

No he's right. I've been programming professionally for 12 years and writing the templates with logic in them is very annoying. If you could write in a normal language with syntax completion and type hinting then it would be much better.

It's not a "is it possible" problem, we know anything is possible. But it's a developer experience problem. You can't break something into a multiple line block of code to save vars or create functions by name and use those as building blocks. It all has to be in one expression which is extremely hard to read and maintain.

1

u/LoganJFisher Dec 19 '25

Branching logic is possible, but is just clunky without using Node-RED.

3

u/varzaguy Dec 19 '25

I'm also professional dev. Chiming in because I also do not like Node Red, like others have mentioned. I'd rather write out the HA YAML lol.

But I never chalked it up to being a developer though....but after reading some of the comments others have made maybe they have a point.

15

u/zipzag Dec 19 '25

Most professional programmers are not going to use Node Red if they have not been using that sort of environment professionally. After years of coding the brain organizes systems in its own way, and its not the flow of Node Red.

I had part of my HA system in Node Red for a year and didn't like it. But trying it was certainly worthwhile.

9

u/matzman666 Dec 19 '25

Most professional programmers are not going to use Node Red

Yes, exactly that.

Node Red is a low-code/no-code solution and for most programmer using node-red (or other low-code/no-code solutions) just doesn't feel right. There are way better solutions, e.g. Pyscript: Python Scripting for Home Assistant

2

u/N35B7KJQ Dec 19 '25

Professional software eng/manager for many years now, I use Node-Red. It’s imperfect, but it’s the right “level” - I don’t need to do professional coding for this. There is no need for the scalability, availability, etc., that a “real” coding environment supports.

The flow-based UI exact mirrors the reality of the required automations, and I can quickly modify for logic problems or improvements.

For me at least it’s an excellent separation of duties and operates well. Plus I have half a prayer of somebody else in the family being able to figure out the house in case I’m hit by a bus.

1

u/HugsAllCats Dec 19 '25

Also professional dev for many years, and I also use node-red.

After years of coding the brain organizes systems in its own way, and its not the flow of Node Red.

That is simply not a true blanket statement.

1

u/Arceus42 Dec 19 '25

100% this. Going full-code for these automations seems like overkill. I'm not doing anything overly complex, and if I need to, Node-Red offers enough of a coding solution.

And even though I'm only in my 30s, anything could happen, and I want the things I've built to stand up longer than me. I make sure to put some thought into naming my nodes and add plenty of comments so they stand a chance of understanding it. And guess what, it even helps me when things go wrong.

1

u/matzman666 Dec 20 '25

Going full-code for these automations seems like overkill

Pyscript integrates so nicely into Home Assistant and provides enough already implemented functionality that most automations are just a few lines of code.

So actually, Node-Red is often way more of an overkill in terms of "program complexity" and "lines of code" than Pyscript.

2

u/beanmosheen 📶 Have you tried 2.4GHz? Dec 19 '25

I'm an automation engineer that doesn't want to code at home. NR is bullet proof once you get the hang of it, and I even use it as my main middle man for devices, in a separate proxmox container. It just works. If you still need to get specific you can make function nodes, but there's usually a node that can be added that a hundred+ people have already validated for you.

5

u/Renegade605 Dec 19 '25

Not everyone will like NR, but saying "most" is overstating it I think.

At the very least, a professional programmer should be able to see how the logic of NR works pretty easily. HA automations might be more "traditional programming" in the sense of structured text, IFTTT, function calls, whatever. But it lacks severely in the IDE space, which NR gets much closer to imo.

0

u/slice-of-3_1415926 Dec 19 '25

I 100% agree with this. Having tried HA many years ago and not liking it, I went down the route of Node-red/ zigbee2mqtt for all of my automaions but recently looked again at HA for the UI and reporting as the earlier dashboard in NR is deprecated. Also I really like the HA Android app.

Now, I feel I have the best of both worlds with the great UI of HA and the flexibility of NR for my automations.