rejectattr ('entity_id', 'in', integration_entities('group'))
type: custom:mushroom-chips-card
chips:
- type: template
icon: |-
{% set domain = 'light' %}
{% set count = states[domain]
| selectattr ('state', 'eq', 'on')
| selectattr ('entity_id', 'in', integration_entities('group'))
| rejectattr ('entity_id', 'in', integration_entities('Demo'))
| list | count %}
{% if count > 0 %}
mdi:lightbulb-on
{% else %}
mdi:lightbulb
{% endif %}
icon_color: |-
{% set domain = 'light' %}
{% set count = states[domain]
| selectattr ('state', 'eq', 'on')
| selectattr ('entity_id', 'in', integration_entities('group'))
| rejectattr ('entity_id', 'in', integration_entities('Demo'))
| list | count %}
{% if count > 0 %}
yellow
{% else %}
gray
{% endif %}
content: |-
{% set domain = 'light' %}
{% set count = states[domain]
| selectattr ('state', 'eq', 'on')
| rejectattr ('entity_id', 'in', integration_entities('group'))
| rejectattr ('entity_id', 'in', integration_entities('Demo'))
| list | count %}
{% if count == 0 %}
No lights on
{% elif count == 1 %}
1 light on
{% else %}
{{ count }} lights on
{% endif %}
```Note: I also had to reject the Demo integration to prevent the template from showing those entities. Also, you can do the opposite of rejecting the Group entities and show *only* them as seen in the screenshot.
EDIT: Changed the IF statement for better context.