I tried to tackle this problem and ran into problems. So i will start again i am using the auto enties plugin from thomas loven that automaticaly pulls new entities into a card . In my case parcels from 17track however they have a long entity name prefixed “seventeentrack package”-item i want to have it automaticaly take out the seventeen track part of the name and just see the item (memo).
I tried custom:template-entity-row but i cannot get it to work is there azn easier way or is my code wrong.
type: 'custom:auto-entities'
card:
title: Parcels
type: entities
filter:
include:
- entity_id: sensor.*track_package_*
options:
type: 'custom:template-entity-row'
name: >-
{{ state_attr('this.entity_id','friendly_name') |
regex_replace(find="Seventeentrack Package: ", replace="",
ignorecase=True)}}
secondary: >-
{% if states[config.entity].last_changed is defined %} {{
relative_time(states[config.entity].last_changed) }} ago {% else %}
Undefined {% endif %} - {{ state_attr(config.entity, 'info_text') }}