How to Take Home Assistant to the Next Level

Home Assistant is a beast. I mean that it’s powerful, but also that it can be hard to tame. If you’re experienced with coding (or any discipline really), you know that best practices can drastically improve efficiency, reliability, how easy it is to manage something over time and consequently, increase the likelihood of you sticking with what you’re working on. Home Assistant certainly has these best practices as well and it can really improve not only the reliability and usability of your Home Assistant instance, but it can also drastically improve the potential of your smart home and what it is capable of. Here’s some tips and tricks for taking your smart home to the next level.

 

Using “Choose” Actions in Automations

Organizing automations is a challenge. Sure, the Home Assistant team has added Categories, Labels, and Filtering which has helped massively with organizing Home Assistant, but how are you supposed to structure your automations? When do you combine automations vs. separate them out? Well a key ingredient to this is using the “Choose” action. “Choose” allows you to essentially add multiple “pathways” for an automation to go down depending on a set of conditions that you establish. What makes this really useful is one of those conditions can be “triggered by”. This really opens up some possibilities! For example, I have an “Eco Mode” for my home. It’s an input boolean (basically a virtually on-off switch) that I use to save energy. Instead of having a separate automation for when this switch is turned on and when it’s turned off, I can combine these using the Choose action. To do this:

  1. Create an automation
  2. Create a trigger
  3. Give that trigger an id
  4. Add a “Choose” action
  5. Add an “Option”
  6. Add a “Condition”
  7. Search for “Triggered by”
  8. Select whichever trigger ids are associated with the trigger you’d like to activate this option
  9. Add whatever actions you’d like to happen when this automation is triggered by your selected triggers

Note that you can add default actions that will occur if none of the conditions are met for any of the actions

So for our Eco Mode example, I’d add a trigger for when Eco mode turns on and a separate trigger for when Eco mode turns off. I’d give these trigger ids. Then I’d create two options. One of when Eco mode turns on and one for when it turns off. Then I’d add whatever actions I want to happen for these two options. Now instead of having two automations, we have one. This may seem kind of pointless in this one example, but as your automations pile up, this really helps keep things tidy. I have a ton of automation going on in my home, but I only have 50 automations. If I broke these out into individual automations, this number would most likely be 200+. This is just one use of the “Choose” action though. Maybe you want an automation to take a different course of action if it’s before 7am vs after. The “If-then” action has it’s place if you have some simple logic you want to accomplish and don’t have a need for the complexity of the “Choose” action, but if you’re trying to accomplish something more complex, using “If-then” is going to result in a mess.

 

Use “Helpers”

If I were asked to point to one thing that could take a Home Assistant beginner and make them into a Home Assistant power user, it’d be Helpers. Helpers can be a little overwhelming, but they can make the potential of your smart home explode as they open up so many possibilities. What are Helpers? Well, if breaking the #1 rule of defining something, Helpers are exactly that. They help. Now…that sounds stupid, but stick with me. Helpers are basically your own sensors that you create that can be used to help accomplish something. Make data collection easier, make monitoring easier, etc.

Let’s start with the simplest helper, the input boolean. Now, if you’re not a coder, that may sound intimidating but trust me, it’s simple. An input boolean is basically a virtual switch. You may remember I mentioned the input boolean in the previous section when talking about the Eco Mode I have in my home. I actually have a bunch of input booleans. They have a variety of uses, but one of the most common use cases of them for me is for the different “Modes” I have for my house. I have things like Eco Mode, Guest Mode, Party Mode, etc. “Okay,” I hear you saying, “but what are these for?”  So, I use these essentially to control my automations. When Guest Mode is turned on, it turns off automations in my house that’d annoy guests, especially if they’re spending the night. Eco Mode activates automations to set my house to an energy-saving mode (useful for when I’m sleeping, when I’ve left the house, etc.). Party Mode activates a script that gets my house ready to host a party. This is useful for a variety of reasons.

Having automations organized in this way makes it easier to manage my automations. I want my house go into an energy-saving mode when I sleep, when I leave the house, etc. And I want it to come out of that energy-saving mode when I’m on my way home, when Im about to wake up, etc. Sure, I can make an automation for each of these instances, but if I want to make a change to what happens when I want the house to save energy, I would need to make that change in several automations.

Also, having this automation go through an input boolean gives me a simple way to manually activate this mode. For example, for some reason my automation to automatically trigger my Sleep Mode, which turns off the lights in the house, turns on Eco Mode, etc. didn’t occur. Instead of having to troubleshoot why that didn’t happen before bed or manually turn off all the lights and such around the house, I was able to open Home Assistant and manually trigger Sleep Mode. Very useful in my opinion.

And this is just one kind of Helper. I highly recommend you read up on the different kinds of helpers and what they’re used for. Some may seem very niche and not very useful, but some of them are incredibly useful and can really open up your options when it comes to building out your smart home.

 

Monitoring

There’s a lot going on with Home Assistant (especially if you’ve spent 100s of hours messing with it). It can be hard to keep track of what’s working, what’s not working, what could use improving, etc. If you’re doing this all manually, you’re gonna miss stuff, you’re gonna forget stuff you should be checking, this list goes on and on. Why not automate this? We think about automating our lights, our heating/cooling, maybe even our bidets (I haven’t gone that far….yet). But you can also automate things that help keep running Home Assistant running smoothly and help keep it reliable. For example, I have an automation that notifies me if Home Assistant hasn’t ran a back up in over 24 hours. This automation also runs if 48 hours have passed and it’ll run one more time if a week has passed. This is super useful as backups are crucial to the integrity of your smart home. And Im not going to remember to check that backups have ran every day (nor do I want to). So I automated this! I have also automated things like sending out notifications if Frigate’s down, Pi-hole’s down, or if my internet connection seems to be down. I have a notification that gets sent out if the UPS that my network rack is plugged into switches over to battery power. The specifics of what these automations look like will vary based on your setup, but it’s crucial to have this stuff in place, especially as your smart home grows and become more complex.

Hopefully some of these tips helped you take your Home Assistant game to the next level, make you feel like a master in the art of Home Assistant, and got you a couple spouse approval points. Home Assistant can be overwhelming, but there are tons of helpful people willing to help, there’s plenty of useful documentation that can guide you in the right direction, and Google is always just a click away.

Have any questions or insight on this topic?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.