News for hackers. Stuff that matters.
Re:Home Assistant 2023.11 by lvncelot on Thursday November 02, 2023 @05:11AM (#38110819)
I've tried getting into Home Assistant a few years ago, but it was right at the switch from declarative yaml files for (almost) everything to most of the stuff being set up via the UI. I would love to give Home Assistant another shot - is that still the case, or is there some way to set up the Home Assistant config via code?
Re:Home Assistant 2023.11 by Dayshine on Thursday November 02, 2023 @05:18AM (#38110883)
I used to be annoyed by the push from yaml to ui. I wanted my config to be version controlled, and I wanted the power that I though text based config gave me.

However, it turns out it's really annoying to use text based config for most things. Primarily because integrations can't edit your config, so you have to do a lot more manual migration of config. Yaml also doesn't have any proper ide support, so it's an annoying loop of restarting the app and staring at logs looking for typos.

And finally the version control was useless because so much of what I wanted to keep was state, which can't be in config.

I've recently realised that I only actually needed the complex rules and UI to be in code. And they still are: now through the ui with instant validation.

Re:Home Assistant 2023.11 by wjdp on Thursday November 02, 2023 @06:07AM (#38111243)
I'm very much in the same boat as you here I think. I loved the idea of version controlled config and accepted the edit/reboot loop as that was the only way of doing it back then. It does seem though most of what was in config does live more naturally in UI, a great example is editing a scene with realtime feedback on the actual devices.

I do still periodically go into the config folder and do a bulk 'bump' commit, though given the config is likely useless without the state of the database I don't know if this is ever going to be useful. Perhaps having some history is good in case a complex automation is lost but still quite limited.

Re:Home Assistant 2023.11 by garblegarble on Thursday November 02, 2023 @06:41AM (#38111550)
>Yaml also doesn't have any proper ide support, so it's an annoying loop of restarting the app and staring at logs looking for typos.

Since YAML is a superset of JSON, I highly recommend converting[1] it to JSON, and then just treating it as a JSON config file.

1: For this, I use yaml2json (npm yaml-to-json)

Re:Home Assistant 2023.11 by maxerickson on Thursday November 02, 2023 @09:23AM (#38113172)
Isn't Yaml a serialization format? Seems like it shouldn't be a big deal to read it into a live object, remap things and then write the updated config back out.
Re:Home Assistant 2023.11 by herbst on Thursday November 02, 2023 @05:32AM (#38110984)
When I tried HA that was exactly what made me hate it. It was all configurable via files, and it was documented that way back then. But my instance wasn't. It took a while and a few useless tries until I realised the UI config is the upgrade and not the other way around.
Re:Home Assistant 2023.11 by zyberzero on Thursday November 02, 2023 @05:27AM (#38110946)
You can do most of the setup right from the UI nowadays. I rarely resort to yaml-files, and if I do it is because the integration is old (and probably not that many that uses it - I can think of two integrations on top of my head that I needed to configure with yaml, traccar for tracking my bike and my local public transport organization) or it's something really special special (I have a thing that calculates the block of the cheapest two hours every day to schedule my dish washer, that was tricky to do OOB in the UI).

Otherwise it's pretty straight forward nowadays!

Re:Home Assistant 2023.11 by sdflhasjd on Thursday November 02, 2023 @05:17AM (#38110860)
Most of the YAML-configuration has been deprecated and is now in the process of being removed. With the exception of manually-configured MQTT entities and some database configuration, everything is mostly done through the UI now.
Re:Home Assistant 2023.11 by 8fingerlouie on Thursday November 02, 2023 @05:18AM (#38110875)
I ran HA for a few years, but have since switched to Homey, which is more like an appliance, but also not quite as powerful as HA can be, provided you have the right hardware.

It works well for me.

Re:Home Assistant 2023.11 by robert_dipaolo on Thursday November 02, 2023 @05:19AM (#38110889)
All the config can be done via YAML still. The UIs are just another option that makes it easier, as far as I can tell the UIs just build the YAML.
Re:Home Assistant 2023.11 by pta2002 on Thursday November 02, 2023 @05:24AM (#38110928)
This is false. While you can set a lot of things through yaml, some like setting the MQTT broker have to be done via the UI.
Re:Home Assistant 2023.11 by robert_dipaolo on Thursday November 02, 2023 @05:57AM (#38111186)
Ah interesting, I didn't realise that! I often drop into the YAML to configure Automations, etc. I'm not using MQTT at the moment.
Re:Home Assistant 2023.11 by pta2002 on Thursday November 02, 2023 @06:15AM (#38111327)
Yes, automations and UI can still be done using yaml (and I don't think they plan on dropping that - it's very useful to be able to put that on version control). It's mostly for configuring integrations that they've dropped the yaml (annoying if you're trying to set it up with NixOS or something, but the home assistant maintainers are unusually aggressive against distro packages anyway, especially for nix...)
Re:Home Assistant 2023.11 by kiliancgn on Thursday November 02, 2023 @07:11AM (#38111762)
I was a complete beginner and had a hard time setting it up years ago since I didn't know much about it. Here's how I did it:

https://www.amalytix.com/en/blog/home-assistant-with-conbee-...

Note: This guide is based on an older version of Home Assistant, but it might still be useful for someone just starting out to understand some general concepts.

Re:Home Assistant 2023.11 by OJFord on Thursday November 02, 2023 @08:12AM (#38112400)
Well that sucks, I missed that.

I've been 'intending' to set it up nicely for years (more than 'a few', clearly) but that's a dealbreaker. Every time I've thought about/planned it, the main annoyance has been NodeRed being like this, I didn't realise HA was now too.

It makes sense maybe for mass market appeal I suppose, but is there something else catering more to developers/tinkerers, those who want it all in text (or better: terraform!) for version control (and just as a more familiar way to edit it than a love-it-or-hate-it UI)?

Re:Home Assistant 2023.11 by Rebelgecko on Thursday November 02, 2023 @02:51PM (#38118262)
I end up having to do a mix of YAML and UI (on top of their templating language which i still can't grok). I think all-YAML is viable but all-UI is not if you use enough advanced feautures