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.
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.
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.
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.
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.