Home Automation

Home Automation

Tips and Tricks for Home Automation

17 Dec 2020

Blueprints: Getting Beyond Hello World

“Hello World” is well known amongst computer programmers and tech enthusiasts. It can be defined as the simplest possible configuration, application, or chunk of code to perform the simplest of tasks that a particular platform enables.

In the world of Home Automation, I believe this to be:

When motion is detected, turn on a light.

In the world of Home Control, this might just be “turn on a light”. But, in terms of Automation, one thing needs to trigger another in order to truly be Automation.

When starting a journey into Home Automation, getting past this first task can sometimes require quite a bit of effort. When this point is finally reached, the user is then ready to automate.

In some cases, this automation, alone, might be enough to accomplish a specific task. But, in most cases it’s not. Consider the following:

  • What will turn Off the light?
  • Should the light turn on even in the day time?
  • When motion is no longer detected, should the light turn off immediately?
  • Are there times when, even though all other criteria are met, I still don’t want the light to come on?

SmartThings got a lot of things wrong. However, one thing they got right was their concept of “Apps”. From the very beginning the system is leaning users toward an understanding that:

Features that I need for automating the lights in my Living Room, will likely also be needed in other situations as I automate the rest of my house.

Additionally, it fosters the idea that, features I need are likely also features that other people will need.

Home Assistant, before now, has not embraced this idea. Every automation was separate from every other automation. And every automation was littered with specific things my automation needed with no easy way to abstract those things out and make the code easily reusable. So writing a new automation similar to one I’d created before was largely a copy/paste/search/replace operation. And, when I realize I need a new feature, I’ve got to go back and add that feature to any other existing places that might benefit from it. Sharing a complex automation like this is cumbersome, at best, because of the amount of search and replace any other user would need to do to make it fir their home.

Enter, Home Assistant Blueprints. This feature, introduced in December 2020, allows for a repeatable automation “blueprint” with user defined inputs. Change the blueprint, and all the automations that use it change too. It’s hard to believe that with over 2000 contributors and over 7 years of active development this is just now a feature, but it’s a huge step in the right direction.

With community adoption, no longer will every user have to reinvent the same set of automation features, when they can simply use a blueprint already created by the community. No longer will my own automations require countless amounts of cut/paste/search/replace in order to, for instance, make all of my lights only turn on when it’s actually dark outside.

This is only the first release of blueprints. I’m looking forward to seeing more features to allow it to grow to its full potential.