Lovelace Battery Entity Card

What an awesome card. Thanks! A glance-type card would be also very nice and probably even nicer. :slight_smile:

Hey there, Thanks for this!

Is there some way to combine it with the auto-entities card, in order to populated it automatically with any sensor or binary_sensor that has `battery_level’ or similar attributes?

Here is the auto-entities card i use but it does not show the levels, just the statuses of anything that reports about battery

card:
  show_header_toggle: false
  title: Things with Battery
  type: entities
filter:
  include:
    - attributes:
        battery_level: <101
      options:
        secondary_info: null
sort:
  method: last_changed
type: 'custom:auto-entities'

But i get this on the right:
image

Hello all,

How can i get the battery_level from the sensors from xiaomi aquara?

Hello,in HA 1.06 i don’t see battery entity cards anyway.
I have no card and HA doesn’t send me any error…
Some week ago,with same configuration,i saw the card perfectly…
Any suggestion?

Same with me. Since 106 - doesn’t work

Sorry, I haven’t had much time lately to work on this, but I saw there was a pull request submitted to fix an issue with this loading in 0.106. If you update to the newer version, that should hopefully address that for you.

Just created a PR for HACS support. @cbulock Can you please create a new release with the last version of the plugin ?:pray:

After the update via HACS - now it works!

Just came across this card. Not sure how I’ve always missed it.

Had to make a change in the raw config editor as HACS adds the wrong entry. It’s should be /community_plugin/ and not /hacsfiles/

Anyway, this works great, but not so much with a glance card. Any chance of getting this to work with glance cards to reduce screen space?

Thanks.

community_plugin will be deprecated soon and the new reference should be hacsfiles instead.

I’m not sure why hacsfiles didn’t work. Have you updated HACS?

Yep. I’m running the latest. I might need to follow up with the HACS topic on these forums.

I`m also interested in this.

Hi, Cameron!

Very nice card. Perfectly works with card type: entities. Is it possible to get it working with cards type: glance ?

1 Like

Love this, is there a reason my battery and friend name are not on the same line though?

####################    BATTERY TAB           ##########################################################################################
  - title: Battery
    icon: mdi:mdi-battery                
    cards:
    
    
    - type: custom:battery-entity
      entity: sensor.bedroom_sensor_battery_level
      name: Bedroom Temp
      

image

This way is not anymore working with bar-card 3.0.0 as in this release the attribute option is removed…
Do you have another way to display battery level using bar-card?

My battery powered items are nearly all zigbee, I use deconz and it has been changed to provide a separate battery entity as well as the sensor entity as part of a device.

So, I no longer use that configuration.

If you use “type: custom:auto-entities”, you can use this for ordering from low to full, as I think the low values are more important:

            sort:
              method: attribute
              attribute: battery_level

There’s a replacement that is maintained (unlike this one) here:

2 Likes

Thanks for a great card!

I instlled it but can get the % to be right for some reason!?!? Any thought why this happens:

type: custom:auto-entities
card:
  type: custom:bar-card
  columns: '1'
  height: 30
  title_position: inside
  align: split
  rounding: 0px
  severity:
    - color: Red
      to: '25'
      from: '0'
    - color: Orange
      from: '26'
      to: '50'
    - color: Green
      from: '51'
      to: '100'
  unit_of_measurement: '%'
  width: 100%
  title_style:
    font-size: 10px
  value_style:
    font-size: 10px
  limit_value: true
  complementary: true
  entity_row: true
  decimal: '0'
  animation:
    speed: '5'
filter:
  include:
    - entity_id: sensor.*.battery_level*
    - entity_id: sensor.shelly*_battery*
    - entity_id: sensor.*.battery*
      state: <=95
  exclude:
    - entity_id: sensor.*gosungrow*
    - entity_id: sensor.*temperature*
sort:
  method: none
  reverse: false
  numeric: true
  show_empty: false

Dunno,
This works

type: custom:auto-entities
card:
  type: custom:bar-card
  columns: 1
  height: 25
  title_position: inside
  align: split
  rounding: 0px
  severity:
    - value: null
      from: 0
      to: 20
      color: red
    - value: null
      from: 21
      to: 40
      color: darkorange
    - value: null
      from: 41
      to: 60
      color: darkgreen
    - value: null
      from: 61
      to: 100
      color: green
  unit_of_measurement: '%'
  width: 100%
  title_style:
    font-size: 10px
  value_style:
    font-size: 12px
filter:
  include:
    - entity_id: sensor.*batt*
      state: <=90
  exclude:
    - entity_id: sensor.*battery_temp*
    - entity_id: sensor.*battery_pow*
sort:
  method: state
  numeric: true
  reverse: false