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.

[Home Assistant] Display Battery devices, sorted by battery status

Simple and handy card, to display devices/entities of a specific type. Thanks to this card, it is no longer necessary to add new battery devices manually.

https://github.com/thomasloven/lovelace-auto-entities

    type: custom:auto-entities
    card:
      show_header_toggle: false
      title: Battery status
      type: entities
      state_color: true
    filter:
      include:
        - attributes:
            device_class: battery
          state: <= 100
      exclude:
        - name: /MI/
        - name: /Redmi/
        - name: /T550/
    sort:
      method: state
      numeric: true