Hello,
I’m doing a dashboard for my phones and I’m having a issue about the battery level icon.
The battery icon show me correctly the level but, when I add the Iphone battery level, I have a “sensor” icon.
I could force a battery icon in my customize file or in the custom card, but my level didn’t change in function of my battery.
Do you have an idea about that ?
If the battery level of the device tracker is not available it will give the state of the battery sensor you are defining, I don’t understand how this can work.
Normaly, when you give put the device_class:battery for the sensor, the icon is a battery and it changes in function of the level of battery (as you can see on my screenshot for example my S8 have 32% of battery, the icon is “battery-30” automaticly). And for my iphone, this functionality doesn’t work (I have a typical sensor icon with the eye and not a battery with the level)
Do you understand my problem ?
Yes I understand your issue, but I don’t know how to help you, for me your code looks alright.
I was just pointing out some other issue you’ll get when the battery level of the device tracker is not available.
I use the iCloud tacking because the official app is in chinese on my phone (Post here).
But, when I add the “device_class: battery” , I should have a battery icon and the icon change in function of the level of battery, isn’t it ?
Effectively , when I use the entities card, I have the battery icon :
To complete, when I click on my “sensor” (the eye icon in my first post), I can see the battery icon and it change in function of the level.
well, you’re right!
I see that now also, didn’t have buttons with battery sensors yet, so never noticed before. Seems the buttons don’t show the device_class battery. They do show on the mobile_app battery sensors, and show on customized sensors.