@Mattie wrote:
I have two device trackers and I want a template sensor that counts the devices fetched by only one of them. I want to filter out all entities that have state=home AND scanner=NmapDeviceScanner
Today I have this and it counts ALL therefore I get dublicates
{{ states.device_tracker | selectattr(‘state’, ‘eq’, ‘home’) | list }}I have tried this but it gives me nothing, anyone knows why?
{{ states.device_tracker | selectattr(‘scanner’, ‘eq’, ‘NmapDeviceScanner’) | list }}
Posts: 2
Participants: 2