I can count the motion binary sensors for a floor using floor_areas. This works:
{{ floor_areas(floor_id(area))
| map('area_entities')| sum(start=[])
| select('match', 'binary_sensor.*_motion_group')
| list| count }}
I want to count the binary sensors that are on for a floor. This doesn’t work:
{{ floor_areas(floor_id(area))
| map('area_entities')| sum(start=[])
| select('match', 'binary_sensor.*_motion_group')
| selectattr('state', 'eq', 'on')
| list| count }}
How can I do this? Ta.