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
I just performed a test, using the Ambient Weather integration, and integration_entities() reported all of the integration’s entities, including entities whose current state is unavailable.
fwiw, I am testing with browser_mod. Hmm… taking a closer look, what’s actually missing is “not provided”… although if I click into the entity, it shows “Unavailable”
So how can I, for example using the websockets api, get a list of all such entities that are no longer being provided? How does the frontend decide this?
What does " it offers a broad range of entity filters" mean?
Not directly, hence my question here. But the frontend, which I can only assume uses the websocket api, has access to the same information that any websocket client would have.
Somehow the frontend decides what is “not provided”. I am trying to understand how it does that.