so the script was happy for a long time till a recent update
Migrate legacy File notify service for domain `file`
The File notify.print_export service is migrated, but it seems the old notify service is still being used.
A new notify entity is available now to replace each legacy notify service.
Update any automations or scripts to use the new notify.send_message service exposed with this new entity. When this is done, select Submit and restart Home Assistant.
export:
alias: print_entity_attributes
sequence:
- service: notify.print_export
data_template:
message: |
{% for state in states %}{{ integration_entities('Zigbee Home Automation') }}
{% endfor %}
mode: single
icon: mdi:cloud-print-outline
Bizarre. That iterates through every State object in the system, and for each one, prints the list of entities associated with “Zigbee Home Automation”. That list is empty, probably because that’s not the backend name of the integration.
Surely your message template should be as per @pjcrosier’s post above?
{% for entity in integration_entities('zha') -%}
{{ entity }}, {{ state_attr(entity, 'friendly_name') }}
{% endfor %}
that is even more bizarre! I already had there zha instead of Zigbee (…) nd it works perfectly fine! Thank you for pointing me in the right direction. But how on earth my script code has been changed? no idea