Lovelace Battery Entity Card

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