Closed barto95100 closed 1 week ago
Go to Settings > Devices & Services > Helpers and create a new template sensor. Name it "Pending Updates Counter." In the value template, you'll want to create a template that adds to a variable each time it sees an update sensor in the 'on' state. Like this:
{% set total = 0 %}
{% if is_state('update.home_assistant_core_update', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('update.home_assistant_supervisor_update', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('update.home_assistant_operating_system_update', 'on') %}
{% set total = total + 1 %}
{% endif %}
{{ total }}
Each add-on exposes an update sensor as well so if you want those to be accounted for you'll need to copy/paste the if statement for each of those as well. Hopefully that makes sense 😀
Ok i understand :)
maybe this is the same :
{{ states.update
| selectattr('entity_id', 'match', 'update.*')
| selectattr('state', 'eq', 'on')
| list
| length }}
Works on my end 👍
HI, I view your video on youtube thanks for sharing your dashboard.
Question: how do you create the sensor pending_update ?