It doesn't count open/closed shutters

Hi, i’m trying to count the shutters that are closed and those that are open, but the count remains at 0

These are the sensors created

- platform: template
  sensors:
    cover_zona_giorno_open:
      friendly_name: "Tapparelle Zona Girono"
      icon_template: "mdi:window-shutter-open"
      value_template: "{{ expand('group.cover_zona_giorno') | selectattr('state', 'eq', 'open') | list | count }}"

- platform: template
  sensors:
    cover_zona_notte_open:
      friendly_name: "Tapparelle Zona Notte"
      icon_template: "mdi:window-shutter-open"
      value_template: "{{ expand('group.cover_zona_notte') | selectattr('state', 'eq', 'open') | list | count }}"

these are the values I receive

Both of those sensors are for “open”. Are there windows in those areas that are open?

What do you get for this in your template editor (dev tools)?

{{ expand('group.cover_zona_giorno') | map(attribute='state') | list }}

Hi, this

I can’t check now, but by default the group’s state will be open if at least one entity is open. The template will update if the group’s state changes. In other words, if you already have one open entity and another opens, the group’s state hasn’t changed. I think you’ve run into the issue where the updates aren’t subscribed to the individual entities.