{"id":5553,"date":"2026-08-30T08:52:28","date_gmt":"2026-08-30T08:52:28","guid":{"rendered":"https:\/\/www.creatingsmarthome.com\/?p=5553"},"modified":"2026-08-30T08:52:30","modified_gmt":"2026-08-30T08:52:30","slug":"home-assistant-how-to-track-low-batteries-with-auto-entities-battery-notes","status":"publish","type":"post","link":"https:\/\/www.creatingsmarthome.com\/index.php\/2026\/08\/30\/home-assistant-how-to-track-low-batteries-with-auto-entities-battery-notes\/","title":{"rendered":"Home Assistant: How to Track Low Batteries (With Auto-Entities &amp; Battery Notes)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I think everyone has bumped into this at some point \u2014 an automation stops working, or a sensor&#8217;s data hasn&#8217;t updated in days, and the reason turns out to be a dead battery\u2026 again. I finally got tired of chasing down dead batteries one device at a time and decided to do something about it properly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I have 51 battery-powered devices scattered around my house that I need to keep track of \u2014 door sensors, motion sensors, dimmer switches, leak detectors, smoke detectors, plant sensors, you name it. In this article I&#8217;ll walk through the setup I built to catch low batteries&nbsp;<em>before<\/em>&nbsp;they die on me, instead of finding out the hard way when something stops reporting.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;m using a couple of Home Assistant custom components to pull this off: the\u00a0<strong><a href=\"https:\/\/github.com\/thomasloven\/lovelace-auto-entities\" target=\"_blank\" rel=\"noreferrer noopener\">auto-entities<\/a><\/strong>\u00a0card and the\u00a0<strong><a href=\"https:\/\/github.com\/andrew-codechimp\/HA-Battery-Notes\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/github.com\/andrew-codechimp\/HA-Battery-Notes\" rel=\"noreferrer noopener\">Battery Notes<\/a><\/strong> integration. Here&#8217;s how they fit together.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Battery Notes integration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is a brilliant integration. <a href=\"https:\/\/github.com\/andrew-codechimp\/HA-Battery-Notes\" target=\"_blank\" rel=\"noreferrer noopener\">Battery notes integration<\/a> scans your battery-powered devices and &#8220;extends&#8221; them with extra data \u2014 most importantly, the battery\u00a0<em>type<\/em>\u00a0\u2014 which turns out to be essential once you get to the end result (more on that later).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Battery Notes tries to automatically figure out the battery type from a community-maintained device library, and to its credit, it got quite a few of mine right without any input from me. But it couldn&#8217;t identify everything \u2014 in my case, I had to manually add 31 of my devices to the integration myself after the initial autodiscovery pass.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each device you add gets a companion&nbsp;<code>_plus<\/code>&nbsp;sensor entity \u2014 mine look like&nbsp;<code>sensor.multi_sensor_utility_room_battery_plus<\/code>, for example. This entity mirrors the original battery percentage, but carries extra attributes alongside it, like&nbsp;<code>battery_type<\/code>&nbsp;and&nbsp;<code>battery_type_and_quantity<\/code>. That second one is the attribute that ends up doing the heavy lifting later in this article \u2014 it&#8217;s the difference between a dashboard that tells you &#8220;27%&#8221; and one that tells you &#8220;27% \u2014 go grab a CR2032.&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"368\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.20.26-1024x368.png\" alt=\"\" class=\"wp-image-5561\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.20.26-1024x368.png 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.20.26-300x108.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.20.26-768x276.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.20.26-1536x553.png 1536w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.20.26-2048x737.png 2048w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.20.26-1920x691.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Discovered and\/or manually added devices on battery notes integration<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Auto-entities card<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/thomasloven\/lovelace-auto-entities\" target=\"_blank\" rel=\"noreferrer noopener\">Auto-entities<\/a> is a card that dynamically builds a list of entities based on a filter, instead of you hand-typing every entity_id into your dashboard config. Rather than maintaining a fixed list of 50-odd sensors and manually appending every new device I buy, I let the card do the filtering for me at render time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The filter isn&#8217;t limited to matching entity_ids or domains \u2014 it can match on state, on attributes, and (crucially for this setup) on&nbsp;<strong>labels<\/strong>. You can also sort the resulting list by state, which means I can have my &#8220;worst battery first&#8221; ordering fall out for free, rather than me manually re-sorting a list every time a battery drains further.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The other piece that makes this work well is that auto-entities lets you override how each matched entity renders, via an&nbsp;<code>options<\/code>&nbsp;block. That&#8217;s what lets me point the filtered results at a specific custom row type (more on this in the &#8220;Needs attention&#8221; section below) instead of settling for the plain default row.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The labelling approach<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s the part I think matters most: I&#8217;m not filtering by entity type or&nbsp;<code>device_class<\/code>. I&#8217;m filtering by&nbsp;<strong>label<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My first instinct was to just match on&nbsp;<code>device_class: battery<\/code>, since every battery-percentage sensor in Home Assistant carries that class. But that net catches&nbsp;<em>everything<\/em>&nbsp;with a battery \u2014 my phone, my smartwatch, my electric toothbrush, the Tesla, the Peugeot, even the robot mower. None of those are things I want cluttering up a &#8220;go buy a battery&#8221; list. A dead phone battery is my problem to charge, not a CR2032 I need to add to a shopping list.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So instead, I created a label called&nbsp;<code>house_battery<\/code>&nbsp;and applied it only to the actual battery-powered&nbsp;<em>devices<\/em>&nbsp;around the house \u2014 the sensors, switches, and detectors that would otherwise silently stop working. Anything I don&#8217;t want tracked (vehicles, personal electronics, anything with its own charging routine) simply never gets the label.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The nice side effect: adding a new battery device to the setup is now a two-second job. I don&#8217;t touch any dashboard YAML at all \u2014 I just find the entity in&nbsp;<strong>Settings \u2192 Devices &amp; Services \u2192 Entities<\/strong>, add the&nbsp;<code>house_battery<\/code>&nbsp;label, and it&#8217;s automatically picked up everywhere that filters on that label. No more remembering to update three different dashboard cards every time I add a sensor.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"283\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.20.40-1024x283.png\" alt=\"\" class=\"wp-image-5560\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.20.40-1024x283.png 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.20.40-300x83.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.20.40-768x212.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.20.40-1536x424.png 1536w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.20.40-2048x566.png 2048w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.20.40-1920x531.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Setting the label on battery+ entity<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">&#8216;Needs attention&#8217; section<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is the beef of the whole setup. The &#8220;Needs Attention&#8221; section is a card that lists every&nbsp;<code>house_battery<\/code>-labelled device currently sitting below 25%, sorted so the most urgent one is always at the top. When nothing is low, the card simply doesn&#8217;t render any rows at all \u2014 no empty &#8220;0 results&#8221; clutter.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">yaml<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>type: custom:auto-entities\ncard:\n  type: entities\n  title: Needs Attention\n  icon: mdi:battery-alert-variant-outline\n  state_color: true\n  show_header_toggle: false\nshow_empty: false\nfilter:\n  include:\n    - label: house_battery\n      state: \"&lt; 25\"\n      options:\n        type: custom:multiple-entity-row\n        secondary_info:\n          attribute: battery_type_and_quantity\nsort:\n  method: state\n  numeric: true\n  reverse: false<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A couple of things worth calling out here:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The&nbsp;<code>state: \"&lt; 25\"<\/code>&nbsp;filter is a string with a comparison operator \u2014 auto-entities parses this itself, there&#8217;s no templating involved.<\/li>\n\n\n\n<li>Each matched row renders as a&nbsp;<code>custom:multiple-entity-row<\/code>, purely so I can show&nbsp;<code>battery_type_and_quantity<\/code>&nbsp;as secondary text underneath the percentage. This is exactly where the Battery Notes&nbsp;<code>_plus<\/code>&nbsp;entities pay off \u2014 without them, there&#8217;d be no&nbsp;<code>battery_type<\/code>&nbsp;attribute to display at all, and I&#8217;d be stuck guessing which battery to grab every single time.<\/li>\n\n\n\n<li>Filtering on the original battery sensors instead of the&nbsp;<code>_plus<\/code>&nbsp;ones would technically still work for the percentage, but I&#8217;d lose the battery-type line entirely, which defeats half the point of building this.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The result: one glance at this card tells me exactly which devices need a battery, and exactly which battery to bring with me before I start crawling around looking for the right sensor.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"593\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.14.34-1024x593.png\" alt=\"\" class=\"wp-image-5559\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.14.34-1024x593.png 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.14.34-300x174.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.14.34-768x444.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.14.34.png 1068w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">The devices that needs battery replacement, before they die totally<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Notifying on the main view<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Having a great &#8220;Needs Attention&#8221; list buried on a Maintenance tab is only useful if I actually remember to check it. So the last piece was a small chip on my main dashboard view that only appears when something actually needs attention.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For this, I needed a helper that checks all the entities labelled&nbsp;<code>house_battery<\/code>&nbsp;and returns true or false depending on whether any of them are below my threshold:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">yaml<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>template:\n  - binary_sensor:\n      - name: \"Battery Needs Attention\"\n        unique_id: battery_needs_attention\n        device_class: problem\n        state: &gt;\n          {{ label_entities('house_battery')\n             | map('states')\n             | map('float', 0)\n             | select('lt', 25)\n             | list\n             | count &gt; 0 }}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>label_entities()<\/code>&nbsp;pulls every entity carrying the&nbsp;<code>house_battery<\/code>&nbsp;label,&nbsp;<code>map('states')<\/code>&nbsp;grabs their current values,&nbsp;<code>map('float', 0)<\/code>&nbsp;converts them to numbers (defaulting anything weird to&nbsp;<code>0<\/code>&nbsp;instead of crashing the template), and&nbsp;<code>select('lt', 25)<\/code>&nbsp;keeps only the ones below threshold. If that list has anything in it at all, the sensor flips to&nbsp;<code>on<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With that helper in place, adding the chip to my main view&#8217;s\u00a0<code>mushroom-chips-card<\/code>\u00a0was simple. Note that this isn&#8217;t a built-in Home Assistant card \u2014\u00a0<code>mushroom-chips-card<\/code>\u00a0is part of the\u00a0<a href=\"https:\/\/github.com\/piitaya\/lovelace-mushroom\" target=\"_blank\" rel=\"noreferrer noopener\">Mushroom\u00a0custom card collection<\/a>, installed via HACS. If you don&#8217;t already have it, you&#8217;ll need to add it before this snippet will work:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">yaml<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>type: custom:mushroom-chips-card\nchips:\n  - type: template\n    entity: binary_sensor.battery_needs_attention\n    icon: mdi:battery-alert-variant-outline\n    icon_color: red\n    content: \"Low battery\"\n    tap_action:\n      action: navigate\n      navigation_path: \/room-based\/maintenance\n    visibility:\n      - condition: state\n        entity: binary_sensor.battery_needs_attention\n        state: \"on\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<code>visibility<\/code>&nbsp;condition is what makes this feel effortless rather than nagging \u2014 when every battery in the house is healthy, the chip simply isn&#8217;t there. The moment something dips below 25%, a red chip appears on my main view, and tapping it drops me straight onto the Maintenance tab where the culprit is sitting at the top of the list, battery type and all.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"421\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.15.26-1024x421.png\" alt=\"\" class=\"wp-image-5558\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.15.26-1024x421.png 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.15.26-300x123.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.15.26-768x316.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.15.26.png 1026w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><code>Battery replacement<\/code> needed shown on my main view<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping up<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">What started as &#8220;ugh, another dead battery&#8221; turned into a setup I&#8217;m genuinely happy with:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Battery Notes<\/strong>&nbsp;gives every battery a type, so I know what to buy instead of guessing<\/li>\n\n\n\n<li><strong>Labels<\/strong>&nbsp;(<code>house_battery<\/code>) keep the list scoped to what I actually care about, and make onboarding new devices a non-event<\/li>\n\n\n\n<li><strong>auto-entities<\/strong>&nbsp;does the filtering and sorting so I never touch dashboard YAML for a new sensor again<\/li>\n\n\n\n<li>A single&nbsp;<strong>template helper<\/strong>&nbsp;and a&nbsp;<strong>conditional chip<\/strong>&nbsp;turn all of that into a notification I&#8217;ll actually see, instead of a card I have to remember to check<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re fighting the same battle, I&#8217;d start with the labelling approach before anything else \u2014 it&#8217;s the piece that made everything downstream (the Needs Attention card, the chip, future additions) close to zero-maintenance.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I think everyone has bumped into this at some point \u2014 an automation stops working, or a sensor&#8217;s data hasn&#8217;t updated in days, and the&hellip;<\/p>\n","protected":false},"author":1,"featured_media":5559,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[100],"tags":[512,243,506,511,203,510,7,507,509,8,508],"class_list":["post-5553","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-home-assistant","tag-auto-entities","tag-automations","tag-battery-management","tag-battery-notes","tag-dashboard","tag-hacs","tag-home-assistant","tag-labels","tag-notifications","tag-smart-home","tag-templates","has-post-thumbnail-archive"],"acf":[],"featured_image_src":"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/08\/Screenshot-2026-08-30-at-11.14.34.png","author_info":{"display_name":"Toni","author_link":"https:\/\/www.creatingsmarthome.com\/author\/topsy\/"},"_links":{"self":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/5553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/comments?post=5553"}],"version-history":[{"count":9,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/5553\/revisions"}],"predecessor-version":[{"id":5566,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/5553\/revisions\/5566"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/media\/5559"}],"wp:attachment":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/media?parent=5553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/categories?post=5553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/tags?post=5553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}