Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 101993

Template count device_tracker

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 101993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>