WTH HA doesnt help me manage batteries in my devices?

Why cant this be a built in solution in HA maybe included in the energy dashboard?
When we have lots and lots of battery operated devices this is a nightmare.

Also an easy way to enable battery replacement reminder would be even more awesome .


There is a nice blueprint for battery notification sbyx/low-battery-level-detection-notification-for-all-battery-sensors.yaml. Battery states are also visible under “Devices”


Voted, for now I use this:

  show_header_toggle: false
  title: Sensors Battery
  type: entities
    - state: '>70'
    - entity_id: '*_battery*'
  method: state
  numeric: true
type: custom:auto-entities

It will show batteries bellow 70% (you can modify as you wish), needs a custom card auto-entities


It is a pretty common requirement. +1.

1 Like

This is a great card for displaying battery levels in the front end.

This is a template sensor I use to trigger an alert.

- name: "Low Battery Alert"
  unique_id: low_battery_alert
  icon: "{{ iif(is_state(this.entity_id,'on'),'mdi:battery-alert','mdi:battery-90') }}"
  device_class: battery
  state: >
    {% set entities = state_attr(this.entity_id,'entity_id') %}
    {% if entities != none %}
      {{ entities|count > 0 and is_state('input_boolean.system_alerts','on') }}
    {% else %} false
    {% endif %}
    entity_id: >
      {% set low_batteries = namespace(value=[]) %}
      {% set low_batts = states.sensor|selectattr('attributes.device_class','eq','battery')
          |map(attribute='entity_id')|list %}
      {% for item in low_batts %}
        {% if states(item) == 'on' or (states(item)|int(-1) != -1 and states(item)|int(0)
            < states('input_number.battery_alert_threshold')|int) %}
          {% set low_batteries.value = low_batteries.value + [item] %}
        {% endif %}
      {% endfor %}
      {{ low_batteries.value }}

I know there are solution to solve this problem but I think HA should be able to handle it out of the box since this is an issue all HA users experience.


Totally agree the support should be improved.

@the-mentor I am not sure what you mean by “this” and “battery management”. Are you talking about more than notifications?

A user is able to define an automation to produce notifications quite easily. However, it would be nice if Home Assistant shipped a notification automation out of the box (with the option to be edited or removed by the user upon free choice)

A probably more important argument to add is Interopability and Guidance.
The various integrations implement slightly different battery indicating entities. This is due to the nature of devices and proprietary limitations, but also influenced by developers preference. The provided solutions in previous posts solve the WTH request only for a couple of those options we see in the wild.
The Home Assistant core and developer documentation should provide clear guidelines which battery entity styles are encouraged and how integrations should implement them. This would solve a lot of things and make the necessary automation a lot easier.

Lastly, this might be out of scope but relevant in this context: I would wish ambitions in the direction to equally address unavailable devices, which is just as critical.


Btw. these might be related:

1 Like

+1 for that – is there a WTH for it?

WTH can’t Home Assistant remember when I last changed the battery in a device without me having to implement a bunch of automations/helpers?

1 Like

Can it also monitor the type of battery?


Or at least allow notes about type of battery. It feels like I don’t have two devices that take the same battery type.

1 Like

I’ve been thinking that it would be great to have a Markdown card in each Device page that lets you add notes, So you could add battery type, manual URL, etc.

1 Like

WTH to have in the Energy Dashboard a built-in HA solution to include all the battery levels of sensors.
WTH to have in the Repairs section the notification of low battery levels.

This is fundamental for all users of HA.

Having to install a “blueprint” is a workaround for what should be included in the core product.


Some of my devices already have the type and number of batteries listed as attributes on the battery percentage sensor. From a quick glance around my instance it seems to be just ZHA devices reporting this information. I agree it would be great if this was available for all devices.

I use z2m, so yes this would be great for all devices, when you get to <30% you could be reminded that you need 2 cr2032 batteries, check your stock or order more.

Doesn’t need to be complicated, just e.g.

  • a notification that turns on when at least one device has battery <20%.
  • click on the notification and it shows you a list of the battery levels of all devices.
  • on that same page some way of ignoring specific devices.

everyone with any batteries has the need for this. I expect most will have done the dance at least once of:

  • ‘this isn’t working’
  • maybe it’s the battery
  • try new battery
  • still not working
  • realise battery was fine, put old battery back in.
  • try to keep new spare battery for ‘next time’
  • pile of batteries out of the packet that you don’t want to throw away.

I’ve created a blueprint as have many others, but I still wish HA did this for you.

1 Like

On the same topic - here’s one for device manufacturers. Why can’t we have 2 coin cell slots - a primary and a secondary? Tell us when the primary has died and automatically switch over to use the secondary.

Then we just need to swap them over and put in a new secondary within ~1yr. No more outages.

1 Like

I put the idea I mentioned above into a WTH for adding a Markdown notes card to the device page. A notes card on the device page lets you capture info about batteries and other stuff:

  • what type does the device take?
  • Do i have any spares and where are they?
  • link to the manual for getting the device open without breaking anything :wink:
1 Like