I have a template which works fine in the dev tools and produces the expected output, but when trying to use it on a dashboard there is no output at all. Can anyone suggest why this might be?
{{ states.binary_sensor | selectattr('state', 'eq', 'on') | selectattr('attributes.device_class', 'eq', 'door') | selectattr('attributes.friendly_name', 'match', '.*window.*') | list | count }}