What I am trying to do is create a sensor that shows the total amount of people connected to my Unifi guest network using the is_guest state
I have created the sensor, but it always shows a value of 0, even though I currently have 1 device connected to the network
- platform: template
sensors:
guest_count:
friendly_name: Guest Count
value_template: >-
{{ states.device_tracker | selectattr('is_guest', 'eq', 'true') | list | count }}
Any idea what i’ve done wrong?