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

Count Devices with 'On' State Using Labels

$
0
0

I created a label called ‘activity’ to count the number of devices with the state ‘on’ and display that count in a badge but I’m having a hard time getting this to work. {{ states | selectattr('attributes.labels', 'in', ['activity']) | list | count }} always returns ‘0’ even though devices that have the label ‘activity’ are on.

5 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 105620

Trending Articles



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