HA Addon Sensor Update

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 :slight_smile:

1 Like

@lonebaggie Does this count hacs updates too? or OS updates?
i want a sensor to count how many updates there all (ALL of them , so hacs, os, addons etc etc) , when you click on it, it should bring me to the page to update.