A new battery state card for Home Assistant is finally here

Disclosure: This post contains affiliate links. If you click through and make a purchase, I’ll earn a commission, at no additional cost to you. Read my full disclosure here.
Advertisement

The Lovelace Battery Entity was, and still is, a popular custom card for the Home Assistant dashboard, as it would display the battery level of any entity. Especially in more recent months, with Zigbee experiencing a rise in popularity, there will be many looking for exactly what this custom card was offering. I’m speaking in the past tense, as the last update to the card’s code was over a year ago and further development seems unlikely.

Advertisement

Unfortunately, that is one of the risks when using open-source software, and it’s one of the reasons why I try to keep my Home Assistant as vanilla as possible. With every new release, there is a chance that stale custom cards will no longer be supported. Luckily though, there is also a benefit to open-source code: Anyone can take it, update it, and improve it. That is exactly what Max Chodorowski did, and we now have a new custom card he calls the Battery State Card.

How the Battery State Card custom Lovelace card works

The Battery State Card doesn’t just add a custom card to the Home Assistant dashboard, it can also be use in entity cards. What that means is that you can display the battery status next to other entities inside the same card.

The battery status being displayed in a Home Assistant entities card.
The battery status being displayed in an entities card (source: GitHub)

More interesting though is when you use the card on its own. As with many other cards, the customization possibilities are endless. You can add custom threshold colours or even define a gradient, for example from green to red. You can, of course, also filter the entities so that only devices that have a lower battery percentage than defined will be shown.

Advertisement

You can also define a tap action as with many other Home Assistant cards. For example, you could send a notification to your phone whenever you see a battery under a certain percentage, or you could open the Amazon page of your favourite vendor.

Perhaps my favourite option is the ability to create sorted lists, so the device with the lowest percentage stays top, and the collapsed view. When using the collapsed view you can define how many devices appear default and by clicking an arrow you can expand the list.

Advertisement

You should be monitoring your batteries in Home Assistant

I definitely recommend you monitor your batteries in Home Assistant one way or another. Of course, you could do it using only automations, but perhaps you like to keep a bird’s-eye view over how things are doing. If the latter is the case, then the Battery State Card is the way to go.

Testing the Zigbee2MQTT web-based frontend

Amazon’s refreshed Fire HD 10 tablets make for great Home Assistant displays

Advertisement
Liam Alexander Colman, the author and maintainer of Home Assistant Guides.

About Liam Alexander Colman

Liam Alexander Colman has been using Home Assistant for various projects for quite some time. What started of with a Raspberry Pi quickly became three Raspberry Pis and eventually a full-blown server. I now use Unraid as my operating system, and Home Assistant happily runs in a Docker container. My personal setup includes many Zigbee devices as well as integrations with existing products such as my Android TV box. Read on to find out more on how I got started with Home Assistant.

Leave a comment

Advertisement
1