Battery level indicator

I have an Amazon fire tablet that is set up as my dashboard with a Tuya local controlled switch to allow the battery to cycle.

I would like to be able to add a battery indicator or a charging indicator to the toolbar at the top on the dashboard to show what state the tablet it is in (similar to a normal battery indicator on a tablet).

Is there anyway to do this? Or any way to control the colour of the toolbar icons based on an entity state? I figured I could just have a blank page with a battery as the icon which could change colour based on state, but I couldnā€™t figure out how to make the icons change colour.

You could use badges in the Dashboard page or use ā€˜Header Cardsā€™ (hacs)

There is no way to natively do what you want. Iā€™m assuming you want to put an icon with the view icons at the very top? This custom card might work for you.

If youā€™re not stuck on that idea, this custom battery state card is the beeā€™s knees. It can be used as both a full card or a single entity (which possibly might be able to used in conjunction with the header card). I have this card on a ā€œsystemā€ view and I have an alert set up which sends a notification to my phone and also displays an icon in my ā€œalerts glance cardā€ on my home view when a battery level falls below the threshold Iā€™ve set.

Here is the card in my system which covers all my battery operated devices (I added the threshold number helper myself)

And here it is when used as an entity.
image

2 Likes

That is perfect! Thanks heaps. With a bit more playing around that will do exactly what I want
image