Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for name_template #728

Open
Superkikim opened this issue Jun 26, 2024 · 0 comments
Open

Add support for name_template #728

Superkikim opened this issue Jun 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Superkikim
Copy link

Is your feature request related to a problem? Please describe.
I use autoentity to get the state of all batteries in my home assistant. I'd like to extract the device name, rather than have the entity name showed by the battery-state-card. Unfortunately, it seems name_template is not supported by battery-state-card.

In the example below, name_template is ignored:

type: custom:auto-entities
card:
  type: custom:battery-state-card
  name_template: '{{ device_attr(config.entity, "name_by_user") or device_attr(config.entity, "name") or state_attr(config.entity, "friendly_name") }}'
filter:
  include:
    - entity_id: '*battery*'
      options:
        tap_action:
          action: more-info
  exclude:
    - entity_id: '*state'
    - entity_id: '*health'
    - entity_id: '*power'
    - entity_id: '*temperature'
    - entity_id: '*range'
    - domain: binary_sensor
sort:
  method: state
  reverse: false
  numeric: true

Describe the solution you'd like
Add the support for name_template to battery-state-card so we can automate and customize entity naming

Additional context
Well, I believe the above description says it all ;-)

@Superkikim Superkikim added the enhancement New feature or request label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant