{{ states.device_tracker | selectattr(‘state’, ‘eq’, ‘home’) | map(attribute=‘name’) | list | join(’, ') }}
How can i have ONLY one state in order that is in home with timestamp?
Can this be use last_time_reachable: ‘2022-08-08T09:49:03+01:00’?
{% set own_devices = ['Nelson', 'Susana'] %}
{% set devices = states.device_tracker
| selectattr('state', 'eq', 'home')
| rejectattr('name','in',own_devices)
| map(attribute='name')
| list %}
{{ devices | list | join(', ') }}
How can i use rejectarr with timestamp for x minutes?
If i have 3 device_tracker with the same name how i show only one
ex: Hugo, Hugo, Augusto, Thor, Rodrigues, Hugo, Louis, Marta, Fiambre, Maria
I have 3 Hugo