This may be overkill but I really hate duplication and love things to be automatically generated. I've got a list of active google home alarms and timers stored in a sensor attribute and want to generate a dashboard for managing them. I've got something simple working like:
type: custom:auto-entities
card:
type: entities
filter:
template: |
{{ state_attr('sensor.pending_alarms_timers', 'members') }}
However I want to ramp things up a notch. I see that auto entities supports more advanced templates. I'm trying to follow their example:
type: custom:auto-entities
card:
type: entities
filter:
template: |
[{% for e in area_entities("bedroom") %}
{'entity': '{{e}}',
'name': 'Lamp at {{device_attr(e, "name").removesuffix("Light").removesuffix("Lights")}}',
},
{% endfor %}]
It works as a markdown card or mushroom entity but if I try and use bubble card as follows:
[{% for e in state_attr('sensor.pending_alarms_timers', 'members') %}
{
'type': 'custom:bubble-card',
'card_type': 'button',
'button_type: 'switch',
'entity': '{{e}}',
},
{% endfor %}]
It seems to explode the number of entities (see attached image) there should only be 2.