4 ms·
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
by lvncelot 3y ago
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?
- robert_dipaolo 3y agoAll 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.
- pta2002 3y agoThis 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.
- robert_dipaolo 3y agoAh interesting, I didn't realise that! I often drop into the YAML to configure Automations, etc. I'm not using MQTT at the moment.
- pta2002 3y agoYes, 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...)
- sdflhasjd 3y agoMost 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.
- 8fingerlouie 3y agoI 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.
- Dayshine 3y agoI 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.
- wjdp 3y agoI'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.
- garblegarble 3y ago>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)
- maxerickson 3y agoIsn'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.
- zyberzero 3y agoYou 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!
- herbst 3y agoWhen 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.
- kiliancgn 3y agoI 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-ii-deconz-xiaomi-aqara-and-hass-io-from-scratch/ 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.
- OJFord 3y agoWell 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)?
- Rebelgecko 3y agoI 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