2021.5: Stability, performance, triggers, color modes!


Here I am again, a month later. Are you used to these monthly release cycles yet? Hello, 2021.5! Nice to see you this May!

I would say this release is a bit less feature rich compared to the previous release (which was epic, in my opinion!). But it is not a bad thing!

Some really good stability improvements have been introduced this release! Not the hot new items you want to explore immediately, but these fundamental things will really help our systems now and in the future. Making this release an upgrade that would be a smooth sail for most of us (check the breaking changes).

The most visual part changed this release can be found in the facelift that the integrations dashboard got. Oh, and the new color modes for lights is an amazing improvement as well!

May… For me, that feels like the summer is slowly trying to make its appearance and I’m looking forward to it 🕶. Do you have a summer Home Automation project figured out yet?

Oh, and don’t forget to tune into the release party live stream later today! (Spoiler alert: I’ve heard we might have a special guest, only Paulus didn’t want to tell me who it is…)

2021.5 Stream Party on YouTube: https://www.youtube.com/watch?v=bvAKUz-bmqU


Database upgrades & performance

There is a database upgrade in this release, but worry not as database upgrades now happen in the background and no longer prevent Home Assistant from starting. During migration, Home Assistant will prevent being restarted or stopped until the migration has been completed.

Thanks to @lmagyar and @raman325 we now can store events up to 64 characters and the recorder won’t get stuck if there is one exceeding that length.

And if you have ever had to wait for the recorder to shut down, worry no more as Home Assistant can now shut down successfully, even when the database is broken.

Talking about broken databases: if you have ever had database corruption of your SQLite database, you probably know how much of a pain it is to get things back up and running again. We recently added live recovery to allow Home Assistant to recover and start a new database when the recorder encountered corruption when saving events or states to the database. This release extends this live recovery to work during migration and purge. This also means no more waiting for a database check on unclean shutdown!

Finally, the recorder performance has been improved by reducing the write frequency.

Startup visibility - What is taking so long?

Ever wondered why starting up Home Assistant took so long?

Stop wondering, as you can now see which integration is delaying startup as the integration taking the longest time to set up is now displayed when Home Assistant is starting.

![](upload://kqAe9ANV06sooO0PLaE0YqL0hMk.png) Screenshot of Home Assistant reporting integrations that are being set up.

And in case you missed those notifications, you can always check the information panel afterward.

![](upload://sW9yJofMDDUjMDnr15FGDrcX6ER.png) Screenshot of information panel showing integration set up times.

This My button brings you right to it:


Why Home Assistant didn’t restart when I pressed the restart button?

So, why didn’t Home Assistant restart when you press the restart button? This question we have seen quite a few times and was a rather annoying occurrence that has been improved.

The restart button now provides feedback! So you know right away if a restart can’t happen because of invalid configuration, broken integration or database upgrade in progress.

We adjusted timeouts and fixed a few places where shutdown would block forever, for example, when restarting Home Assistant the configuration gets checked and there was a case that could hang in this check forever.

This means restarts are faster now! As more parts of Home Assistant now cancel/react to the shutdown procedure better than before (from the Month of What the Heck).

We also audited the top 35 integrations to make sure they stop polling on stop. Thanks for turning on analytics!

Updated look and feel for the integration dashboard

The Integrations dashboard has been updated to have a more compact look and provide more useful information.

For example, it now shows the state of the integration and in case of a failure, it will now tell you why that is.

![](upload://6bxwFm08bN3U6Zp5cRhzg0fkuWA.png) Screenshot of the updated integrations dashboard.

Additionally, you can now recognize integrations that rely on the cloud (they show a little cloud label) and integrations that are installed as custom integration (they show a little package label).

Color modes!

We now have support for RGBWW, RGBW and many more color modes!

Previously, we relied mainly on HS (Hue Saturation) & Brightness (HSB/HSV) and colors in Home Assistant was based on that. But now, an integration can provide the actual color mode an light supports. This allows Home Assistant (and integrations) to adjust the behavior for the light better.

For example, the frontend will adjust the color picker based on the color mode of the light. The more info dialog for lights have been modernized to support this change:

![](upload://bjy4hyQ3Ze9Ujk5C94ac5ZMSKwH.png) Screenshot of the updated more info dialog for lights.

Please notes, that at this moment not all integrations are able to support color modes yet. However, all lights do have an nice updated UI as in the screenshot.

Trigger-based binary template sensor

In the previous release, we introduced a trigger-based template sensor. This release extends on that features by adding support for trigger-based binary sensors using templates.

Trigger-based binary sensors can also be configured with an auto_off duration. This will automatically turn a binary sensor state to off after the specified duration.

  - trigger:
      - platform: event
        event_type: netatmo_event
          type: movement
      - name: "Motion"
        # We use auto_off, so just set it to true on each trigger
        state: "true"
        device_class: motion
        # Automatically turn off 60 seconds after the last event
        auto_off: 60

Some other ideas:

Docker images now signed and available on the GitHub Container Registry

We are now using both DockerHub and the new GitHub Container Registry.

If you want to use the new GitHub Container Registry, just use:


(Instead of homeassistant/home-assistant)

Our core images are now also signed with CodeNotary and allowing you to check the integrity of our images.

CodeNotary is a distributed Ledger solution using the immudb as a database for built-in cryptographic proof and verification.

If you are running the Home Assistant Operating System or a Supervised installation type, we already check the integrity of our distributed content. If you running the Container installation, you can install the VCN tool.

Now you can use it like so:

docker pull ghcr.io/home-assistant/home-assistant:2021.5.0
vcn authenticate --org home-assistant.io docker://ghcr.io/home-assistant/home-assistant:2021.5.0

This will tell/confirm that the image you have, is actually created and shipped by the Home Assistant project.

Other noteworthy changes

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

  • Are you in meetings a lot? The new mutesync integration shows if you’re in a meeting and if you’re muted in Home Assistant. This will unlock some cool do-not-disturb automations.
  • We did an audit of memory leaks and fixed a couple of generic cases in our core codebase. But also fixed over 15 cases during unload/reload in popular integrations.
  • The TTS service by Home Assistant Cloud now uses an improved bitrate, making it sound even more impressive.
  • ClimaCell now supports the v4 API. So, I’ve you’ve wanted to test it out you can now actually use it with the new API keys. Thanks @raman325!
  • If you are into templating, we now have min() and max() available as functions in Jinja templates.
  • The AdGuard integration now supports multiple instances thanks to @eifinger.
  • When viewing your logs in the frontend, the log entry will tell you if the log was created by a custom integration.
  • If you have a Sonos Move or Sonos Roam, you can now see their battery level and charging state. Thanks for that @hufman and @jjlawren.
  • Template covers now can have an opening and closing state, which was added by @bdr99, thanks for that!
  • The ZHA integration now has configuration options in the UI, allowing you to set things like default transition times for your lights. Thanks @dmulcahey!
  • The Z-Wave JS integration now allows you to re-interview a device from the UI thanks to @cgarwood.
  • @cgarwood didn’t stop there, you can now opt-in for sending Z-Wave JS telemetry to the Z-Wave JS project to help them out. This can be turned on in the Z-Wave JS configuration panel.

This is a companion discussion topic for the original entry at https://www.home-assistant.io/blog/2021/05/05/release-20215/

Thanks to all developers for the good work :muscle:

I would be happy if you (or other developers) could now also support ZHA (Zigbee Home Automation) analogous to Z-Wave JS. For example in the frontend there is still room for improvement. Maybe we can inspire more users of Deconz + Zigbee2MQTT for ZHA. :heart:

Breaking Change for Dwains Lovelace Dashboard.
But there is still a fix: Releases · dwainscheeren/dwains-lovelace-dashboard · GitHub

1 Like

Whoa, the momentary switch is now a real thing?

That auto-off trigger-based binary sensor sounds seriously handy. I had a number of template sensors doing some really awkward things like checking to see if a sensor was on and its last_updated was less then X minutes ago. Will be glad to get rid of those now() based sensors in favor of this native functionality. :+1:

EDIT: Oh I should probably ask, what happens if there’s a restart before the auto-off time is reached (like if you had it set to a couple hours for example)? Does it still turn off after the designated amount of time, does it get stuck on or does it reset to off after a restart?

1 Like

Very good to see some work on the database, I hope that continues. Having to use an “external database” like influxDB is a hassle and causes quite a lot of “trouble”.

1 Like

What do you mean about ZHA?

Nice, I find myself looking forward to the monthly updates. Probalby more than I should :slight_smile:
One question, though:
The Surepet integration; it says I can remove entries from my configuration.yaml… but what should I replace those parameters with?


Hmm, interesting, I am getting this in the logs:

Invalid server version: Z-Wave JS Server version is incompatible: 1.3.1 a version is required that supports at least api schema 4

But i didn’t see anything as a breaking change for Z-Wave JS, did I miss it? :slight_smile:

Edit: Managed to rebuild my zwavejs2mqtt and it’s all working.

Actually, this should just be advertising for your good work, but I hope more developers can support ZHA and more users will use this.

For Examples:
“Zigbee Network: In the future you can change network settings for ZHA here.”
Frontend optimization for groups etc.
ota updates
firmware updates for zigbee sticks like conbee

1 Like

YESSSSSSSSS!!! Thank you!

1 Like

Is there a way to use the new motioneye integration with the motioneye addon by frenck?
I tried to use the URL of the addon host http://a0d7b954-motioneye but this didn’t work.
Is there a better way or will this only work if motioneye is exposed to the world?

1 Like

Please fix the nuki integration issue, which started in beta 1.


I just updated my docker container on my synology NAS but now my USB connected devices won’t work (RFXCOM + slimme meter)

FileNotFoundError: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AL18B4EL-if00-port0'
serial.serialutil.SerialException: [Errno 2] could not open port /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AL18B4EL-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AL18B4EL-if00-port0'

if I go into the console, I see that /dev/serial/ doesn’t exist anymore. Does anyone have the same problem and a fix for this perhaps?

1 Like

Thank you for this release!
Somewhere in november 2020 rebooting Home Assistant went up from a few minutes to 5+ minutes (reboot time measured from Home Assistant “stop” event, a VM reboot, to Home Assistant “started” event) .
Now with 2021.5 rebooting Home Assistant takes 46 seconds!
(Home Assistant running on an Intel NUC BOXNUC8I5BEH2,16 GB RAM, allocated 4 processors + 4 GB RAM in Proxmox, loading from a Samsung 970 EVO 1 TB SSD)

I updated my test instance (Home Assistant Supervised on Debian, RPI3) and it completed without a hitch.

The only Log warnings were for some Helpers that took longer than 10 seconds to load. I’ve seen it reported in previous releases and have ignored it; maybe it’s normal to take >10 seconds to load a few dozen Helpers on an RPI3. :man_shrugging:

Anyway, 2021.5 now clearly shows how long each integration took to load and that’s handy:

Screenshot from 2021-05-05 15-55-59

Thank you to everyone involved for your hard work!

A special note of thanks for the re-invented Template integration. It took several minutes of busy work to convert all my Template Sensors and Template Binary Sensors from ‘legacy’ format to ‘modern’ format but the end-result was worth it. Now all of them are neatly organized in one place, containing trigger-based and non-trigger-based Template Sensors and Template Binary Sensors.

It seems the Adaptive Ligthing integration is broken. I also restarted HA again, but lights don’t change levels anymore. Didn’t see this in the changelog. Anyone having same experience?

Reverting back to 4.6 now, which does work again.

Is there a perk to using the GitHub repo instead of the DockerHub?

1 Like

A custom integration. There would be no breaking change note for it unless the change were related to all custom integrations.

I thought it became part of core since it comes with HA since HA 117. So it’s still a custom integration, regardless if it now comes with HA?

It was never included in HA.

If you look where all of Home Assistant’s integration code is stored, there’s no Adaptive Lighting Integration.

In addition, it’s not present in the list of official integrations: Integrations - Home Assistant