2021.4: For our advanced users ❤️


Survived April fools day? I assure you, this April release is no joke!

This release is dedicated to our more advanced user base, as it is packed with some really advanced features and enhancements our more experienced users will love. Ready to debug your automations? Yeah…

Not that advanced of a user? I’m sure there is something in here for you to look forward to as well.

Oh, by the way, have you heard the news of ESPHome joining the Home Assistant family? If not, you should definitely read the blog post announcing it!

Enjoy the release!


Database upgrades, please be patient

This release contains database migrations, meaning that the format of how your history is stored is changing. This migration is automatically performed after upgrading and takes a bit of time. The time it takes depends on how much history you have stored and how fast your system is.

Please be patient when upgrading to this release.

Automation debugging

Wait, why didn’t that light turn on? Why isn’t the thermostat adjusted? Why is this automation not working? What is going on here?! This is a haunted house!?!

Sounds familiar? I’m sure we all had these moments, but are you ready for this? We can now debug automations!

Screenshot showing the automation trace of a previously ran automation Screenshot showing the automation trace of a previously ran automation.

The above screenshot shows a previous run of an automation. The automation is displayed using an interactive graph, which highlights which path the automation took. Each node in the graph can be clicked to view the details on what happened with the automation during that specific step. It traces the complete run of an automation run.

If an automation didn’t run as it should, this will allow you to debug and understand why it ran the way it did.

This extremely advanced and super useful feature is thanks to the hard work of @emontnemery who build the backend for this. The beautiful graphing was made by @thomasloven, and all the frontend work by @balloob & @bramkragten. Marvelous job guys! Thanks!

Additionally, a special thanks to all the (beta) testers that helped testing this feature and those who provided trace samples that helped to squash bugs!

Got questions about this feature? Want to see it in action? Be sure to tune in to the 2021.4 release party stream later today!

Home Assistant Analytics

Now don’t be scared by the title!

Today we introduce: Home Assistant Analytics. Opt-in, privacy-aware, public and open source. Just as it all should be for our project.

@ludeeus did a fantastic job writing this new integration. You decide if you turn it on or not; however, we guarantee it’s privacy-aware. Doubt it? Review it! Everything is open source!

Not open enough for you? We are publishing the result for everybody to see:

Screenshot of the Home Assistant Analytics website Screenshot of the Home Assistant Analytics website.

Well, maybe you want to view the public result yourself:


So why do we do this? Well, it helps the project and all contributors to see things like: Most used integrations. This can significantly help with improving project priorities. It also helps to convince manufacturers to work with Home Assistant, add local control and privacy-focused features.

“But the updater did this already, right?” Yes, well, the updater has actually been broken. So while we had some data, it was barely usable (actually not useable at all). Instead of fixing the updater, we now have a better solution that better matches our project goals. The updater still exists; it now just does one single thing: showing if an update is available.

Want to help the project out? Please enable Home Assistant Analytics. We would be very grateful!

You can find the settings in the general configuration options, or click the My Home Assistant button below to go directly to it. (Only visible to owner users)

Screenshot of the Home Assistant Analytics options Screenshot of the Home Assistant Analytics options, you control the amount of data you share.

For more information on how this all works and what data is shared, check out our documentation.

Thanks for sharing already! ❤️

Warnings for undefined variables in Templates

This feature is really cool. While technically a small improvement, it is a change that can impact you (as in “breaking”), but also, will greatly help you!

So imaging this little template: {{ my_variable }}

Previously, if my_variable would not exist in the template or system as a variable, Home Assistant would just ignore it and skip over it.

While this can be convenient, it can become problematic when it was misspelled or referring to a variable that doesn’t exist at all. For example, if you would have mistyped it: {{ my_varaible }}, you would never know something is wrong, unless you spotted it.

As of today, Home Assistant will tell you this, using a warning in the logs!

Screenshot of undefined variable warning log Screenshot of undefined variable warning log.

This helps to find templates that behave unexpectedly because the variable you thought was there, isn’t. It is quite possible you get a bunch of warnings after upgrading to this release. Fixing those warnings, really helps to improve your setup.

So, what if a variable isn’t always there, but I still want to use it? Well, you can give it a default, for example: {{ my_variable | default }}. Or even a default value (10 in this example): {{ my_variable | default(10) }}.

Please note that these are just warnings for now. We plan to replace the warning with an error as of Home Assistant 2021.10 (in October).

Filtering automations, scripts and scenes

Categorizing automations, is definitely one of the most requested things in our history. This became clear again during last year’s month of what the heck and various issues/discussions/feature requests.

Suggestions for labels, folders, and many more have been created. However, we already have some great categorizing features in Home Assistant itself:

Devices, Areas & Entities.

Screenshot of filtering automations by the living room area Screenshot of filtering automations by living room area.

As of today, you can filter your automations, scripts and scenes by area, device or entity. For automations and scripts, it goes one step further; it magically finds those that affect the area, device or entity being filtered.

So, you can now look at the automations affecting your living room area (even if those automations itself are not in the living room area) and also filter the automation list with just the ones that touch your thermostat.

Z-Wave JS update

So before we talk about The nice new things in Z-Wave JS, there are breaking changes in this release for the Z-Wave JS integration that could affect your existing automations. Be sure to read the backward-incompatible changes section for more info.

Alright, now the fun stuff! You can now configure each Z-Wave device straight from within Home Assistant. When you view a device in the Home Assistant frontend, you can click on “CONFIGURE DEVICE” button that is shown on each device page. This allows you to manage and adjust device (node) specific configuration parameters for the selected device.

Screenshot of configuring a Z-Wave device from within Home Assistant Screenshot of configuring a Z-Wave device from within Home Assistant.

Furthermore two new, advanced, services are introduced:

Trigger-based template sensors

This release adds initial support for a pretty advanced new, helpful feature. Template sensors, that are updated based on triggers and the data that comes with it.

Whenever the trigger fires, the template sensor will re-render and it will have access to the trigger data in the templates. This feature is a great way to create data based on webhook data, or have sensors be updated based on a time schedule.

See, for example, these two template sensors that update based on a single webhook trigger using data pushed into the webhook:

# Example configuration entry
  - trigger:
      - platform: webhook
        webhook_id: my-super-secret-webhook-id
      - name: "Webhook Temperature"
        state: "{{ trigger.json.temperature }}"
      - name: "Webhook Humidity"
        state: "{{ trigger.json.humidity }}"

You can test this trigger entity with the following CURL command:

curl --header "Content-Type: application/json" \
  --request POST \
  --data '{"temperature": 5, "humidity": 34}' \

It is not just webhooks! Any trigger that you can use in automations, can be used to update these types of template sensors.

For this release, it only works for sensors; other platforms are not supported yet.

Please note: that these new template sensors are configured under the template: key in the configuration and is using a new configuration format and keys. For more information, see the documentation.

UI selectors for script fields

You can now use UI Selectors for you scripts field parameters. This brings the same UI capabilities that Blueprint have to scripts. This allow for creating advanced scripts that you can later easily reuse in your UI (even in UI automation).

Screenshot of scripts using selects in its fields Screenshot of scripts using selects in its fields.

For more details on these new field configuration options, see the scripts documentation

Other noteworthy changes

There is much more juice in this release; here are some of the other noteworthy changes this release:

  • The Supervisor is now also in the integrations dashboard, and provides entities for all kinds of things! These entities are disabled by default, so head over to the integration and see if there anything in there you could use. Thanks @raman325!
  • The develo Home Control (@Shutgun), Apple TV (@bdraco), August (@bdraco) and MQTT (@RadekHvizdos) integrations can now suggest areas.
  • You can now configure additional Google Cast devices by IP address via the integrations options. This is helpful in case of mDNS issues. Thanks @emontnemery!
  • @joshmcrty added support for selecting the number formatting you like on your profile! Awesome work!

Screenshot of selecting the number format you prefer in your profile Screenshot of selecting the number format you prefer.

  • @marvin-w added support for unique IDs to KNX entities. So, as a KNX user you can now tweak your entities in the frontend and group them into areas!
  • HomeKit now supports CO/CO2 device classes, thanks to @iMicknl!
  • @robertdelpeut added monthly and yearly totals to the DSMR sensor, thanks!
  • Hyperion users can now hide certain effects from the UI using integration options. Thanks, @dermotduffy!
  • Got that one message in your logs that you don’t care about? @jshufro added support for filtering log messages using regular expression!
  • The Plex integration now provides library count sensors! These are disabled by default by can be enabled if you like that. Thanks, @jjlawren.
  • The Quickbar had an update from @donkawechico! So press those C & E keys on you keyboard to see those beautiful new labels.

New Integrations

We welcome the following new integrations this release:

New Platforms

The following integration got support for a new platform:

Integrations now available to set up from the UI

The following integrations are now available via the Home Assistant UI:

Release 2021.4.1 - April 8

Release 2021.4.2 - April 9

Release 2021.4.3 - April 10

Release 2021.4.4 - April 13

Release 2021.4.5 - April 16

Release 2021.4.6 - April 19

If you need help…

…don’t hesitate to use our very active forums or join us for a little chat.

Experiencing issues introduced by this release? Please report them in our issue tracker. Make sure to fill in all fields of the issue template.

Backward-incompatible changes

Below is a listing of the breaking change for this release, per subject or integration. Click on one of those to read more about the breaking change for that specific item.

Farewell to the following

The following integrations are no longer available as of this release:

  • Griddy has been removed, Ercot shut down Griddy after the massive power mess in Texas in mid February. (@bdraco - #47218)

All changes