Lovelace Battery Entity Card

@gkrokum I use the javascript console so I can see what errors are being thrown and debug the card.

It seems in my case the fold-entity-row component doesn’t like the icons, if I display into a standard entity card it’s all ok.

This got so much easier with 0.100 now all batteries have their own sensor:

type: 'custom:auto-entities'
card:
  type: 'custom:bar-card'
  columns: 1
  height: 20
  title_position: inside
  align: split
  rounding: 0px
  severity:
  - value: 30
    color: '#bf4040'
  - value: 60
    color: '#bf9540'
  - value: 100
    color: '#40bf40'
  unit_of_measurement: '%'
  width: 100%
  title_style:
    font-size: 12px
  value_style:
    font-size: 10px
filter:
  include:
    - entity_id: sensor.*.battery_level*
      state: <=90
4 Likes

@Holdestmade I’m not sure which card you’re talking about, I’ve been trying to use the lovelace-battery-entity card. I don’t see it creating any battery sensors.

However, I did finally figure out what my issue was. When you install the battery-entity card from the HACS Store, you have to install the master version and not the 0.1 version. The 0.1 version is missing the getBatteryLevel() function.That may be what is causing the issue you’re seeing @jwelter.

Any plans to make this work with a glance type card? Takes up way too much space as just entities.

2 Likes

@gkrokum
I’m using the auto-entities card as mentioned above in a few posts. v0.100+ of HA generates sensors for all sensor battery attributes.

Is there any option to enable those sensors ?
I run v 0.102 and no battery sensor has been created so far

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