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.

Can't get charging state to show

See original GitHub issue

Hello, I have this YAML to embed the battery state card into my dashboard:

type: custom:battery-state-card
title: Ladestand
entities:
  - entity: sensor.handy_florian_battery_level
    charging-state:
      entity_id: binary_sensor.handy_florian_is_charging
      icon: mdi:flash
      state: 'on'

Display of battery state works fine, but charging state is ignored, i.e., no visual indication. The entity binary_sensor.handy_florian_is_charging is correct (copy & pasted it directly into the state overview) and is verified on when charging.

Anything I am missing here?

Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
flolicommented, Jan 10, 2022

@floli there is a mistake on your config in charging_state should be underscore not dash

Ar, now it works:

entities:
  - entity: sensor.handy_florian_battery_level
    charging_state:
      entity_id: binary_sensor.handy_florian_is_charging
      state: 'on'

@OddSquirrel Do you have similar fault? For me, that issue can be closed, problem was between keyboard and chair.

0reactions
maxwroccommented, Jan 9, 2022

@floli there is a mistake on your config in charging_state should be underscore not dash

Read more comments on GitHub >

github_iconTop Results From Across the Web

Monitor the Battery Level and Charging State
Start by determining the current charge status. The BatteryManager broadcasts all battery and charging details in a sticky Intent that includes ...
Read more >
Show the battery percentage on your iPhone or iPad
With iOS 16, you can turn on the battery percentage so it appears in your status bar. Go to Settings > Battery, and...
Read more >
Fix an Android device that won't charge or turn on
Check that your charger and cable work. Try them with another device. Check that the cable is securely connected to the charger and...
Read more >
Get battery level and state in Android - Stack Overflow
Tutorial For Android has a code sample that explains how to get battery information. To sum it up, a broadcast receiver for the...
Read more >
All Android Phones: How to Fix Charging Problems, Won't ...
... keeps restarting, won't charge, slow charging, won't hold a charge, etc let's fix this right now. Try all these steps to get...
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