2021.5: Stability, performance, triggers, color modes!

Comments

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 backward-incompatible 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

../Frenck

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.

Screenshot of Home Assistant starting 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.

Screenshot of information panel showing integration set up times 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.

Screenshot of the updated integrations dashboard 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:

Screenshot of the updated more info dialog for lights Screenshot of the updated more info dialog for lights.

Please note, 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.

template:
  - trigger:
      - platform: event
        event_type: netatmo_event
        event_data:
          type: movement
    binary_sensor:
      - 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:

ghcr.io/home-assistant/home-assistant

(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, If 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.

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.5.1 - May 7

Release 2021.5.2 - May 10

Release 2021.5.3 - May 11

Release 2021.5.4 - May 14

Release 2021.5.5 - May 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.

Container udev

We no longer run an udev instance inside our containers. This was used by the Supervisor which now is using the host udev in all containers.

For now, we have a fallback environment variable USING_UDEV=1 which you can set on your container to get the old behavior. This gives you time for using the Docker way to map/use devices.

If you run a system that uses the Supervisor, this is automatically taken care of.

(@pvizeli- #180)

Custom integrations

Custom integrations now require a version key in their manifest file, this also means that all custom integrations now require a manifest file.

If you are using a legacy custom integration like custom_components/awesome.py this now needs to move to custom_components/awesome/__init__.py so you can add custom_components/awesome/manifest.json to it.

For more information about integration, manifests have a look here: https://developers.home-assistant.io/docs/creating_integration_manifest

Custom integrations that do not have this will be blocked from loading if it’s missing a version in the manifest starting with Home Assistant 2021.6.

If you see these errors, please report the issue with the author of that custom integration.

(@ludeeus - #49726)

Events

An event fired with an event_type of more than 64 characters would previously result in recorder errors but the event would otherwise work. Now, firing an event with more than 64 characters in the event type will raise immediately.

If you are using long events in your automations or scripts, you should adjust to this change. Custom integration authors should review their event types.

(@raman325 - #48115)

ASUSWRT

The device_tracker entity state attribute ip_address has been changed and is now be named ip. You need to update automations and scripts that use this attribute.

(@bieniu - #48764)

AVM FRITZ!Box Tools

The AVM FRITZ!Box Tools integration is now configured via the UI. Configuring the integration via YAML is now deprecated. Existing YAML configuration is automatically imported on upgrade and can be safely removed after upgrade.

(@chemelli74 - #48287)

AVM FRITZ!SmartHome

YAML configuration for AVM FRITZ!SmartHome has been removed, after it has been deprecated for 12 months. Configuration via UI is fully integrated. Existing YAML configuration has already been imported automatically in the previous releases and can now safely be removed from your configuration files.

(@mib1185 - #49663)

DHT Sensor

The pin configuration option is currently an integer but will need to be prefixed with D for Raspberry Pi platforms.

Please adjust your YAML configuration for this change.

(@TheGardenMonkey - #41525)

ecobee

ecobee climate devices will change the reported temperature precision for their current_temperature attribute from whole degrees to 0.1 degree increments. Automations which rely on whole-number precision may need adjustments.

(@jjlawren - #48697)

Setting a fan hold in the ecobee integration will no longer also set a temperature hold. If any automations assumed that the temperature would be set when calling the set_fan_mode service on an ecobee device, those automations will need to add the appropriate set_temperature service call.

(@bjpetit - #48086)

Enphase Envoy

Enphase Envoy has fully transitioned to configuration via UI. YAML configuration will be removed in an upcoming version. Existing YAML configuration will be imported automatically, and can now safely be removed from your configuration files.

All sensors are now configured by default. Each inverter has a unique ID and can now be disabled in the UI.

(@bdraco - #48517)

Ezviz

The Ezviz integration is now configured via the UI. Configuring the integration via YAML is now deprecated. Existing YAML configuration is automatically imported on upgrade and can be safely removed after upgrade.

All camera state attributes were removed and replaced by binary_sensors, sensors or switches.

List of old camera state attributes with their new replacements:

  • “privacy”: switch entity, camera_name.privacy
  • “audio”: switch entity, camera_name.sound
  • “ir_led”: switch entity, camera_name.infrared
  • “state_led”: switch entity, camera_name.light
  • “follow_move”: switch entity, camera_name.tracking
  • “alarm_notify”: camara status, “Recording”
  • “alarm_sound_mod”: sensor, camera_name.alarm_sound_mod
  • “encrypted”: binary_sensor, camera_name.encrypted
  • “local_ip”: sensor, camera_name.local_ip
  • “detection_sensibility”: sensor, camera_name.detection_sensibility

If you are using one of these attributes in your automations or scripts, you will need to adjust to this change.

(@RenierM26 - #45722)

Garmin Connect
The unit of measurement from Garmin Connect timestamp sensors has been removed. It used to be set to empty string. If you have automations, scripts or external data recvorder that rely on unit of measurement for these sensors, you might need to adjust to this change.

(@MartinHjelmare - #48431)

GNTP (Growl)

The GNTP (Growl) integration has been deprecated and is going to be removed in Home Assistant Core 2021.6.

The Growl project has now fully retired, see: https://growl.github.io/growl/

(@frenck - #49273)

Google Travel Time

The Google Travel Time integration is now configured via the UI. Configuring the integration via YAML is now deprecated. Existing YAML configuration is automatically imported on upgrade and can be safely removed after upgrade.

(@raman325 - #43509)

Hive

The existing Hive service heating_boost will be deprecated in Home Assistant release 2021.6 and a new service to replace it has been created called heating_boost_on.

If you use the heating_boost Hive service please update your configuration to the new service. A deprecation warning will be printed to the logs when the deprecated service is used.

(@KJonline - #48701)

KNX

The config_file YAML option for KNX was deprecated before and has now been removed.

(@marvin-w - #48799)

Light profiles

When a light entity has a default profile associated, the default profile will only be applied for the light.turn_on service call when the light state is off or no data is sent with the service call.

The transition attribute from the default profile in light_profiles.csv will also be applied when light.turn_off is called.

(@karliemeads - #49376) (light docs)

Litter-Robot

reset_waste_drawer, set_sleep_mode, and set_wait_time now have their own services. Previously, they were triggered by using send_command. If you used any of those commands in your automations or scripts, you’ll need to replace them with their service counter-part.

(@natekspencer - #48300)

Modbus

A new option SWAP replaces REVERSE_ORDER, however REVERSE_ORDER is still accepted and silently converted to SWAP=WORD.

Note: REVERSE_ORDER will be removed in a future release.

Old configuration example:

modbus:
  sensors:
    - name: "sensor1"
      address: 17
      reverse_order: true
      ...
   - name: "sensor2"
      address: 17
      reverse_order: false
      ...

New configuration example:

modbus:
  sensors:
    - name: "sensor1"
      address: 17
      swap: word
      ...
   - name: "sensor2"
      address: 17
      swap: none
      ...

Swap allows none/byte/word/word_byte options.

(@janiversen - #49719)

Recollect Waste

Recollect Waste pickup dates are now stored as UTC timestamps.

(@bachya - #48690)

Recorder

Database migrations are now done in the background and no longer prevent Home Assistant from starting.

The migration is started shortly after the started event since they are CPU intensive (mostly just sqlite since it’s in the same process) and we do not want to compete with startup.

Events created by your system are queued and processed when the migration is completed. There is a safety to start discarding events if more than ~30000 events happen before migration is completed to avoid memory exhaustion.

During migration, Home Assistant will prevent being started or stopped and this will also disable the homeassistant.stop and homeassistant.start services until the migration has been completed.

The sqlite database recovery logic can now recover at point after setup including purge, migration, and event insert. In short we can always (hopefully) recover and start a new db without a restart.

The quick check is no longer performed on unclean shutdown since we can always recover live. The db_integrity_check option has been deprecated.

(@bdraco - #49036 #49098)

If you are using a PostgreSQL database please verify that your connection URL starts with postgresql://. In case you use still an old URL starting with postgres://, please replace it with postgresql:// otherwise you will get an error to set up the recorder.

RoonLabs music player

The RoonLabs music player media_player previously had integration specific services for roon.join and roon.un_join. These have been removed removes and replaced with the media_player.join and media_player.unjoin services.

If you use these services in your automations or script, you need to adjust those.

(@pavoni - #49667)

Shelly

The Shelly Wi-Fi RSSI sensor unit was wrong, it is dBm and not dB. If you rely on the unit of measurement from this sensor, you might need to adjust to this change.

(@thecode - #49265)

SimpliSafe

The unpublished SimpliSafe cloud API no longer provides a functioning websocket. Therefore, the integration will no longer be able to receive SIMPLISAFE_EVENT or SIMPLISAFE_NOTIFICATION events, nor will it be possible for stage changes performed outside of Home Assistant (e.g., via the keypad) to be reflected in Home Assistant in near-realtime.

(@bachya - #49876) (simplisafe docs)

SMA Solar

The SMA integration is now configured via the UI. Configuring the integration via YAML is now deprecated. Existing YAML configuration is automatically imported on upgrade and can be safely removed after upgrade.

Using custom sensors is deprecated and not possible using the UI. Feel free to submit additional sensors to be added as standard sensors to the pysma library.

The pv_power sensor is now reporting DC power of solar panels side A and named pv_power_a for new installations. grid_power is the total power supplied to the grid.

(@rklomp - #48003)

Sure Petcare

The following YAML configuration options have been deprecated:

  • feeders
  • flaps
  • pets
  • scan_interval

If you have one of these options in your YAML configuration, you can safely remove those.

(@benleb - #49223)

Swiss Hydrological Data

FEON/BAFU changed their data which required removing some of the attributes.

The following attributes are no longer available:

  • delta-24h
  • max-1h
  • min-1h
  • mean-1h
  • previous-24h

(@Bouni - #49119)

System Monitor

The unit of measurement from System Monitor timestamp sensors has been removed. It used to be set to empty string. If you have automations, scripts or external data recorder that rely on unit of measurement for these sensors, you might need to adjust to this change.

(@MartinHjelmare - #48431)

Tasmota

Tasmota lights no longer supports deprecated white_value, use rgbw_color instead.

(@emontnemery - #49599) (tasmota docs)

The Tasmota Wi-Fi RSSI sensor unit was wrong, it is dBm and not dB. If you rely on the unit of measurement from this sensor, you might need to adjust to this change.

(@thecode - #49263) (tasmota docs)

Waze Travel Time

The Waze Travel Time integration is now configured via the UI. Configuring the integration via YAML is now deprecated. Existing YAML configuration is automatically imported on upgrade and can be safely removed after upgrade.

(@raman325 - #43419)

ZeroConf

If the default_interface is not set, the value is auto-detected based on the system routing next hop for the mDNS broadcast address (224.0.0.251).

If the next-hop cannot be detected or is a loopback address, zeroconf will broadcast on all interfaces. If the next hop is a non-loopback address, zeroconf will only broadcast on the default interface.

Setting the default_interface to true or false will override the auto detection.

(@bdraco - #49529)

Farewell to the following

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

Both integrations were in a broken state and using webscaping methods to gather their data, which is not allowed for core integrations.

All changes

Click to see all changes!