🔹 Auto-entities - Automatically fill cards with entities

@Mariusthvdb

  - type: custom:auto-entities
    card:
      type: grid
      title: Test Icon color Buttons
      columns: 4
    card_param: cards
    filter:
      template: >-
        {% set threshold = states('input_number.test_number')|float(0) -%} {%-
        for s in states.sensor|selectattr('entity_id','search','battery_')
           if s.state|float < threshold -%}
          {{
            {
              'type': 'custom:button-card',
              'entity': s.entity_id,
              'aspect_ratio': '1/1',
              'show_state': 'true'
            }
          }},
        {%- endfor %}
    sort:
      method: state
      numeric: true

2 Likes