Tu peux tester ça :
type: custom:auto-entities
card:
type: entities
filter:
template: |-
{% for DEVICE in states.sensor -%}
{%- if DEVICE.entity_id | regex_match('sensor.virt_snd_hr_*',ignorecase=False) -%}
{{
{
'entity': DEVICE.entity_id,
'type': 'custom:multiple-entity-row',
'icon': 'false',
'entities':
[
{
'entity': DEVICE.entity_id.replace('hr', 'tp'),
'name': false
}
],
}
}},
{%- endif -%}
{%- endfor %}
sort:
method: friendly_name
J’ai trouvé qqc sur le forum international qui m’a permit tester un peu à la maison.
code de mon test
type: custom:auto-entities
card:
type: entities
filter:
template: |-
{% for DEVICE in states.sensor -%}
{%- if DEVICE.entity_id | regex_match('sensor.tph_ch.*._battery',ignorecase=False) -%}
{{
{
'entity': DEVICE.entity_id,
'type': 'custom:multiple-entity-row',
'name': '-'.join((DEVICE.attributes.friendly_name).split('-')[1:]).split(' ')[0],
'icon': 'false',
'entities':
[
{
'entity': DEVICE.entity_id.replace('battery', 'temperature'),
'name': false
},
{
'entity': DEVICE.entity_id.replace('battery', 'humidity'),
'name': false
}
],
}
}},
{%- endif -%}
{%- endfor %}
sort:
method: friendly_name
Test effectué sur ces 3 capteurs :