@fresh frost This is my version of what you are trying to create. In my case, I'm counting just lights that are on in the Living Room area.```yaml
type: custom:mushroom-chips-card
chips:
- type: template
content: |-
{% if states.light | selectattr('state', 'eq', 'on')
| map(attribute='entity_id') | map('area_name')
| select('in', ['Living Room'])
| list | count == 0 %}
{0}
{%else %}
{{states.light | selectattr('state', 'eq', 'on')
| map(attribute='entity_id') | map('area_name')
| select('in', ['Living Room'])
| list | count}}
{%- endif %}
icon: mdi:lightbulb
icon_color: |-
{% if (states.light | selectattr('state', 'eq', 'on')
| map(attribute='entity_id') | map('area_name')
| select('in', ['Living Room'])
| list | count) >= 1 -%}
yellow
{%- else -%}
white
{%- endif %}
hold_action:
action: call-service
service: light.turn_off
service_data: {}
target:
area_id: living_room```