Here is another way of detecting if there are any Home assistant addon that need updating. It just searches through the update domain and counts any addon’s that has a status of true and records the entity_id
template:
- sensor:
- name: 'addon_update'
attributes:
entity: |
{% set ns=namespace(e = []) %}
{% for s in states.update if 'on' in s.state %}
{% set ns.e = ns.e + [s.entity_id] %}
{% endfor %}
{{ns.e}}
state: |
{{states.sensor.addon_update.attributes.entity|count|int}}
The state returns the number of addon that need updating and the entity attribute list the entity id
Hope its useful to someone