Homelab, Linux, JS & ABAP (~˘▾˘)~
 

[Home Assistant] Zigbee2MQTT device_class motion is now occupancy

After the last Zigbee2MQTT update to version 1.39.0, suddenly the motion sensors were missing in my auto-entities cards, which I use to display all motions sensors for specific areas.

type: vertical-stack
title: Bewegungsmelder
cards:
  - type: custom:auto-entities
    card:
      show_header_toggle: false
      title: null
      type: entities
      state_color: true
    filter:
      include:
        - attributes:
            device_class: motion
          options:
            secondary_info: last-changed
          area: cellar
    sort:
      method: last_changed
      reverse: true

When checking the changes included in the new Zigbee2MQTT version, I found the reason: https://github.com/Koenkk/zigbee2mqtt/pull/22896
With this pull request, the device_class is motion is replaced with occupancy. After changing the device_class in the auto_entities config, the motions sensors are displayed again.

Alternatively, you can switch the device_class back to motion, like it is described here. This would also bring back the old icon mdi:motion-sensor instead of mdi:home-outline.

Leave a Reply

Your email address will not be published. Required fields are marked *