Best way to monitor battery of devices from zigbee2mqtt

The suggested way to monitor the battery status is with an automation:

trigger:
  - platform: numeric_state
    entity_id: my_entity_id
    below: 20
action:
  - service: notify.mobile_app_your_phone
    data:
      title: "Low Battery Alert"
      message: "{{ trigger.to_state.name }} is at {{ trigger.to_state.state }}% battery."`

but this requires me to setup an automation for each single device.

Is there a way to monitor all devices with a blacklist for some that I might not want?

What about availability as well?

I’ve seen solutions that require a template for each device as well, which is infeasible. I’d like for it to work for newly added devices as well

You may wish to examine this custom integration.

https://codechimp.org/HA-Battery-Notes/

Related discussion topic:

this :heart: 🪫 Low Battery Notifications & Actions

and you can use both of those above at the same time

Unfortunately, your monitoring results with whichever method you decide to use, will only be as reliable as the reporting from the actual device is.

And that’s where many of my struggles with replacing batteries in time come from:
No matter, if it’s an Aqara, Sonoff, or Philips Hue device, there’s always a few that keep reporting 100% battery charge until they stop working because they completely ran out of juice :frowning: