question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

? in battery icon when 100%

See original GitHub issue

Describe the bug I have many battery status entities set up on one page. But most of the time the battery state icon for those that are at 100% will be green with a ? mark inside it. If I refresh the page the icon goes solid green and the ? disappears for a while then returns. I have deleted the Battery State Card a few times in case is was installed incorrectly but I can’t work out why it does this. All the other icons that are less than 100% in battery level always show up correctly

How to reproduce As above

Expected behavior

YAML configuration

`color_gradient:
  - '#ff0000'
  - '#ffff00'
  - '#00ff00'
entities:
  - entity: sensor.aeotec_dsb45_water_sensor_battery_level
    name: Garage Aeotec DSB45 Flood Sensor
  - entity: sensor.fibaro_system_fgfs101_zwave_flood_sensor_battery_level
    name: Kitchen FIBARO FGFS101 Flood Sensor
  - entity: sensor.fibaro_system_fgk101_door_opening_sensor_battery_level
    name: Loft Bedroom Window Sensor
  - entity: sensor.fibaro_system_fgk10x_door_opening_sensor_battery_level
    name: Loft Bathroom Window Sensor
  - entity: sensor.fibaro_system_fgms001_zw5_motion_sensor_battery_level
    name: Kitchen Motion Sensor
  - entity: sensor.lumi_remote_b1acn01_32_battery_level
    name: Lounge Smart Switch
  - entity: sensor.mi_magic_cube_battery_level
    name: Magic Cube Sensor
  - entity: sensor.motion_sensor_battery_level
    name: Motion Sensor
  - entity: sensor.multi_sensor_conservatory_battery_level
    name: Conservatory Multi Sensor
  - entity: sensor.multi_sensor_lounge_battery_level
    name: Lounge Multi Sensor
  - entity: sensor.multi_sensor_master_bedroom_battery_level
    name: Master Bedroom Multi Sensor
  - entity: sensor.multi_sensor_olivias_bedroom_battery_level
    name: Olivias Bedroom Multi Sensor
  - entity: sensor.smart_switch_battery_level_2
    name: Master Bedroom Switch
  - entity: sensor.smart_switch_2_battery_level
    name: Olivias Bedroom Switch
  - entity: sensor.vibration_23_battery_level
    name: Vibration Sensor A
  - entity: sensor.vibration_sensor_battery_level
    name: Vibration Sensor B
  - entity: sensor.water_sensor_main_bathroom_battery_level
    name: Main Bathroom Flood
  - entity: sensor.water_sensor_master_bath_suite_battery_level
    name: Master Bathroom Flood
title: Sensor Battery Level Status
type: 'custom:battery-state-card'
`


Screenshots

Version < 1.4.1>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
maxwroccommented, Oct 7, 2020

Awesome. I think I will add yet another fix and I’ll release 1.5.0 today/tomorrow with all of them

1reaction
maxwroccommented, Oct 7, 2020

I’m glad to hear it worked! This issue was reported already by bunch of people (here and on HA community forum) and I was not able to fix it without having a repro. So thanks for your help!

TBH at the moment I don’t know where exactly the problem is located but for sure it is caused by refreshing/re-rendering the card too often. And it looks like the final result is a mixture of two states which were passed for rendering.

Surprisingly it affects only the icon - not other stuff. Maybe it is because SVG icons are slow to render and when the state is updated but previous icon haven’t finished rendering the new update for the icon-item is discarded.

So to fix it I have added rendering throttling. It should improve the general performance as we are skipping now rendering previous states which would be overwritten anyway (millisecond later).

What next: Today evening I will prepare the final version of the code. I would like to ask you to do one more test with the final code. Once I hear from you it works fine I will release new version of the card.

Read more comments on GitHub >

github_iconTop Results From Across the Web

the battery indicator is always 100% - Microsoft Community
but after buying a new battery the battery indicator is always showing 100% and the battery isn't charging and everytime I unplug the...
Read more >
Solved: Battery Indicator showing 100% all the time - 6291942
The battery check utility says the battery is operating normally. There seems to be a slight change in how this works now. The...
Read more >
Battery 100% charged, icon showing red? - Apple Community
Upon opening the laptop, the battery icon was red, and had 100% charge level. I calibrate my battery nearly daily. Show more Less....
Read more >
How to Fix a Yellow Triangle Warning Symbol on the Battery ...
The yellow triangle warning indicates that the system has encountered an issue with the battery.
Read more >
100% battery, icon is red - MacBook Air 13" Early 2017 - iFixit
100% battery, icon is red. I had plugged in my Mac after being dead for a couple hours and I let it fully...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found