Closed swa72 closed 2 years ago
{% set device_ids = states
| selectattr('state', 'in', ['unavailable', 'unknown'])
| map(attribute='entity_id')
| map("device_id")
| map("string")
| unique
| select("ne", "None")
| list
%}
This one will list both scripts and automations, ready to copy to Excel
{{"Name;Domain;Entity_ID;Area Name"}}
{% for state in states %}
{%- if 'script' in state.entity_id or 'automation' in state.entity_id -%}
{{state.name}};{{state.domain}};{{state.entity_id}};{{area_name(state.entity_id)}}
{% endif -%}
{%- endfor -%}
scripts have no area :-/
This one will only list automations without area
{{"Name;Domain;Entity_ID;Area Name"}}
{% for state in states %}
{%- if 'automation' in state.entity_id -%}
{%- if area_name(state.entity_id) == None -%}
{{state.name}};{{state.domain}};{{state.entity_id}};{{area_name(state.entity_id)}}
{% endif -%}
{% endif -%}
{%- endfor -%}
Card listing devices not entities? - Configuration / Frontend - Home Assistant Community
https://community.home-assistant.io/t/card-listing-devices-not-entities/355833