/images/avatar.webp

Two quick tricks for better HomeAssistant automations

It’s hard to believe, but the venerable Home Assistant project has just celebrated it’s 7th birthday with release .115! While HA does get better with each new release, it is by no means perfect :D. This post came about because of a new feature in release .115 and the subsequent limitations of that feature!

In the course of trying to integrate Home Assistant with all the things, everybody eventually hits some major limitation or bug and is forced to find some sort of workaround. Below are a few techniques that I’ve collected over the years to simplify some of my Home Assistant configuration and work around some of the platforms various limitations.

Adding an airborne particulate mater sensor to WS3 Weather Station

A while back, I posted a small bit of code that could decode the data from the ubiquitous WS3 Weather Station and make it accessible to the amazing HomeAssistant via the wonderful ESPHome project. Since then, my weather station has been dutifully collecting data that’s been invaluable for augmenting automation that deals with indoor climate.

As the numerous wild fires in California rage on, the air quality has gone from bad to dangerous. Knowing that outside was warmer, but less humid, was no longer enough to make a smart decision about weather or not to open the windows for some cost-effective cooling. I now need HomeAssistant to be aware of how clean the outside air was before making the decision to pipe in outdoor air.

RSS and Home Assistant: early warning for grid blackouts

California, like most of the West Coast, is currently in the middle of a prolonged and serious heat-wave. Record breaking temperatures results in a distribution grid stressed beyond it’s abilities which guarantees blackouts.

The organization that oversees the electric grid in California publishes RSS feeds for various types of grid related news and events. All the CA ISO RSS feeds are published here, but the two feed that I’m using are:

Announcing The Missing ToDoist Tools

TMTDT: The Missing ToDoist Tools 🎉

As the name implies, TMTDT started as a small collection of scripts that I used to augment ToDoist with features they can’t/won’t implement. It’s grown quite a bit since then.

I don't know how to make flashy demo gifs.

I don't know how to make flashy demo gifs. See the file driving the demo

Those scripts started as simple idea and quickly morphed into a creaky, but essential, tool. As more features were added it continued too morph into an unmaintainable mess. Untangling that mess was on my todo list but never a high priority partly because of issues TMTDT was designed to solve 🤦.

Systemd Resolved With Consul Agent

I pieced this technique together a while back and created a gist for it. I’m creating this post as a pointer to that gist so I have something that’s a bit easier to reference and refer others to.

And i want to test out the hugo shortcode for embedding a gist :smirk:.

The really short version:

  • Create a dedicated interface that can only be accessed from the local system
  • Bind the consul-agent’s DNS service to this local only interface
  • Tell systemd-resolved that all hostnames with the .consul TLD can be resolved via a DNS server on this local interface

No need to disable resolved and replace it with dnsmasq :smile: