Output Format Text
Verfasst: Mo 18. Apr 2022, 17:04
Hallo, ich suche eine Lösung wo mir der Sensor als Output den Text untereinander ausgibt, als Liste.
Wo und wie mach ich das?
Grüße
Code: Alles auswählen
{% set tracker = states.device_tracker
| rejectattr('attributes.entity_id', 'defined')
| selectattr('state', 'eq', 'not_home')
| map(attribute='name') | list %}
{% set qty = tracker | count %}
{% if qty == 0 %}Alle Device online
{% else %}Offline: {{ tracker | join (', ') }}
{% endif %}
Grüße