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 templating ability to entity name #7

Open
regystro opened this issue Aug 8, 2020 · 0 comments
Open

Add templating ability to entity name #7

regystro opened this issue Aug 8, 2020 · 0 comments

Comments

@regystro
Copy link

regystro commented Aug 8, 2020

Hi.

Would it be possible to add the same templating capabilities like in secondary_info for the entities name?

I know I can customize the friendly_name in Lovelace, but that wouldn't work for dynamical entities like the ones generated by this integration: https://www.home-assistant.io/integrations/seventeentrack/

And something like

type: entities
title: Parcel
entities:
  - entity: sensor.seventeentrack_package_tracknumber1
    name: >-
      {{ state_attr(entity,'friendly_name') | regex_replace(find='Seventeentrack
      Package: ', replace='', ignorecase=True) }}
    secondary_info: 'Status: {{ state_attr(entity,''info_text'') | upper }}'
  - entity: sensor.seventeentrack_package_tracknumber2

would be awesome, specially if used in conjunction with Thomas Lovén's auto-entities to auto populate all trackings at once.

Thank you and greetings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant