battery-state-card: Card not shown at all after updating to 3.1.0
Describe the bug
After updating from 3.0.1 to 3.1.0, the card is not shown at all.
How to reproduce Update from 3.0.1 to 3.1.0.
Expected behavior Card is shown as there are no breaking changes listed at https://github.com/maxwroc/battery-state-card/releases/tag/v3.1.0
YAML configuration Just one example
- type: custom:battery-state-card
entities:
- entity: group.batterystate_devices
title: š± GerƤte
secondary_info: '{last_updated}'
tap_action: more-info
sort:
by: state
desc: false
collapse: 12
filter: 0
round: 0
unit: '%'
colors: null
bulk_rename:
- from: ' Battery Level'
to: ''
- from: ' Battery level'
to: ''
- from: ' Akkufüllstand'
to: ''
- from: ' Batterieladung'
to: ''
- from: ' Batteriestand'
to: ''
Screenshots Just imagine a white/empty space hereā¦
Version Battery State Card: 3.1.0 HA: 2023.4.6
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Comments: 35 (13 by maintainers)
Thanks! Unfortunately Mon will be the earliest Iāll be able to look into it. The only advice I can give now is to downgrade, sorry for the inconvenience
This gives me enough info. Now I have realized that you have a pretty old HA instance and the status formatting function doesnāt exist in it
The below setting at the card/entity level should help
Hi @maxwroc just tried 3.1.5 and it works fine - well done š Thank you
Did some more digging and went into the Chrome settings and went to āPrivacy and securityā and clicked āClear browsing dataā then checked āCookies and other site dataā and āCached images and filesā and cleared those for āAll timeā and restarted Chrome. I had to sign back into HA but the card started working.
Just wanted to chime in⦠Chrome 120.0.6099.129 on Linux does not display the card but the card does display correctly in Firefox 121.0.1 on Linux and on the Home Assistant Companion app on Android. At least thatās whatās happening for me.
Please note: tested https://github.com/maxwroc/battery-state-card/releases/tag/v3.1.3, no change (cards still not shown at all).
Upgraded to 3.1.2 but the problem is still there. As mentioned in https://github.com/maxwroc/battery-state-card/issues/630 removing the sort section fixes the display issue, i.e. entities are visible, however they are not sorted. 3.1.0 still works as expected.
Yes, solved this as well for me. My pretty simple config was:
I had to remove the
entities: null
line. Not sure by what this line was introduced. Only changes recently where clicking through the updates of HA and addons.Thank you so much for such detailed testing and info. Iāll try to figure out something from it in the next couple of days (although Iāll be traveling and I donāt know how much time Iāll be able to spend on it).
What I can recommend at the moment only is to downgrade to 3.0.X š
Well I did so and built from
to
What I discovered in 1/2 an hour of further testing:
renders fine too:
group.batterystate_devices
as entity does not. So does when using one random entity of that group likesensor.iphone_battery_level
, which gives <nothing> againsensor.home_assistant_core_cpu_percent
to (one of) the non-workingsensor.iphone_battery_level
:device_class
andstate_class
So it seems like if thereās only one single āwrongā entity, v3.1.0 is refusing to render the whole card. Just a wild theory.
Really not sure if you can make something out of this. Trying with many different entities is likely a good approach to find a pattern. As Iām not used to the dev-tools power of my browser Iād need to have an exact how-to if you want me to test something (using Firefox). By the way of course I tested it with other browsers too: the HA Companion app (iOS) also shows not a single card anymore with 3.1.0. Iāll downgrade for nowā¦