tdvtdv / ha-tdv-bar

A Home Assistant lovelace card to display bar chart oriented to display power sensors
55 stars 1 forks source link

Using device friendly_name instead of sensor friendly_name #12

Open OppyLock opened 6 months ago

OppyLock commented 6 months ago

If I add a sensor.foo_power to the entities list the card is picking up the devices friendly name instead of the sensors friendly name.

This makes it a bit tricky to use something like auto entities to feed the card when there are some devices that have multiple power sensors. They all end up with the same name.

I'm trying to add, and sort, all my power entities using this card with auto entities. Something like this.

type: custom:auto-entities
card:
  type: custom:tdv-bar-card
  title: Power Card
  trackingmode: 4
  show_header_toggle: false
filter:
  include:
    - entity_id: sensor.*_power
  exclude: []
show_empty: true
sort:
  method: state
  numeric: true
  reverse: true
  ip: false
  ignore_case: false