In Praise of Home Assistant

Home Assistant logo

Home Assistant automates a lot of things in my house. For a very long time I had used it only to schedule everyday vacuuming, but recently I’ve been adding more and more stuff to it. I am amazed. I am hooked. I’ve found myself thinking about new automations all the time. When I slack off, instead of browsing funny cats videos, I check room temperatures or which thermostat preset is enabled.

Home Assistant becomes more and more powerful as new devices appear. Recently I bought my first few Zigbee devices: 2 Aqara temperature / humidity / pressure sensors and a Conbee II Gateway. They are not the cheapest ones (although their price is more than acceptable), but they have perfect reviews for reliability. I have paired them with Shelly wifi switch and created a heater thermostat which easily surpasses my previous “stupid” solution, limited only to a time schedule. I have also created straightforward graphical controls from which my family can change the vital settings.

But here’s the best: your automations can base on literally any information available to Home Assistant. There are some cloud- and non-cloud-based integrations available, like weather forecast, sun position, intelligent workdays tracking. Why enable your thermostat in hardcoded “winter” months when you can base on a certain forecast threshold?

Or this: I’m a little worried about my Shelly switch as the most unreliable device in this setup. It handles fairly high electrical current after all, and it’s connected to the device which ultimately burns methane to produce heat. When it short circuits the heater pins for flame control, it has to handle a current of up to 2.5 A (where max Shelly load is 16 A). When under the load, its internal, passively-cooled components heat up to 80°C1. So I have this “safety fuse” automation which:

  1. switches off thermostat;
  2. switches off Shelly2;
  3. send notifications
  4. wait 5 minutes
  5. switch on thermostat back (but not Shelly).

I’d rather have colder room than a gas heater to replace. Or fire to put off. All things considered, safety fuses, sensor monitoring and notifications are over half of all my automations.

One of the great things about Home Assistant is that it’s extremely hackable. It allows endless tinkering, but if you’re not into that, you can setup your automations once and leave it running. It will do its job. Once you get familiar with it, adding new automations takes a minute or two.

I was worried about its “YAML as a programming language” configuration format. It is the idea which I despise3, but I have regained some of my sanity when I learned that most parts of these YAMLs accept Jinja templates. I love Jinja. Old, good Jinja. If you don’t know, this web page is rendered thanks to it. So I changed my approach to HA’s configuration andnow most of my non-trival automations are simply templates. It’s funny that they’re simply templates, because HA lists templates under advanced topics. Ha!

There’a also Node Red, which is quite popular HA addon. I’d say that most people prefer using it over writing YAML configurations. I don’t, because I am plain text freak and I store my HA configuration in git repository. I’m a little worried though that auto-detected devices and integrations aren’t stored in plain text. In case I’d like to set up Home Assistant from scratch, it’s going to cost me additional day or two of work.

There are of course some rough edges. There are parts which I don’t like. But they’re minor and most people probably won’t even notice. I put my trust in HA developers who are actively working on smoothing the overall experience. Which is pretty great right now, out of a box. But it becomes better with every release.

Who knows, maybe one day my I’ll spark the interest of my wife and she’ll set up a new integration or automation instead of me? After a deep code review, of course. :)

  1. It should automatically turn off at 95°C, but I don’t trust it enough. 

  2. It’s redundant, because switching off thermostat switches off its controlled switch as well. 

  3. And probably the reason why I’ve never learned Ansible.