hi,
i have an template, what prints alls existing mqtt entity Ids with additional infos.
in the past i got results for model ID
with attribute model
names in brackets with this script?
now i get back without model id
, but with the exact same script?
i had documented the used template in my excel, so im sure it was exact the same…gues i had made an zigbee2mqtt update in meantime…
any chance to include the model id
again? i would appreaceate to have it in seperate columns… in the past i had to extraxt it from model name in excel… but now i would be happy to have it anyhow…
here the template
{{'Device;Domain;Entity ID;Manufacturer;Model;Area;Integration;ID'}}
{% for state in states -%}
{%- if device_attr(state.entity_id, 'identifiers') -%}
{%- set integrations = device_attr(state.entity_id, 'identifiers') | first | list -%}
{%- set integration = integrations[0] -%}
{%- set unique_id = integrations[1] -%}
{%- else -%}
{%- set integration = '-' -%}
{%- set unique_id = '-' -%}
{%- endif -%}
{%- if device_attr(state.entity_id, 'manufacturer') -%}
{%- set manufacturer = device_attr(state.entity_id, 'manufacturer') -%}
{%- else -%}
{%- set manufacturer = '-' -%}
{%- endif -%}
{%- if device_attr(state.entity_id, 'model') -%}
{%- set model = device_attr(state.entity_id, 'model') -%}
{%- else -%}
{%- set model = '-' -%}
{%- endif -%}
{%- if device_attr(state.entity_id, 'area_id') -%}
{%- set area = device_attr(state.entity_id, 'area_id') -%}
{%- else -%}
{%- set area = '-' -%}
{%- endif -%}
{%- if 'zigbee2mqtt' in unique_id -%}
{{state.name}};{{state.domain}};{{state.entity_id}};{{manufacturer}};{{model}};{{area_name(area)}};{{integration}};{{unique_id}}
{% else -%}{#<=ACHTUNG: hier KEIN MINUS! sonst komplette RückgabeErgebnis als eine zeile!#}
{%- endif -%}
{% endfor %}
and one another problem with that template
the devices are listed with 2 blanks in front? do i have an error in my script, can´t get rid of that too…
thanx
br
Frank