When everything is settled, my main eyes on HA will be a tablet… so I won’t have a side menu to notify me when there is an update available.
I’d like to create a card that tells me when there is an update available.
I’ve been reviewing some code, but it was from 2019 so quite old. And they were complaining about a built-in update entity going absent after it was triggered.
At the moment, I’ve created myself an input.boolean and used that to create a card on the dash… and I’ve got an automation running that checks all the “update” options for all the entities (including one plug, one light, etc.) and then set that card to true if any of them fires… but honestly, it’s a hack of a way of doing things and I was wondering whether there is any better way please.
As it turns out, this code doesn’t work anyway. Just saw an update come through for Whisper and my automation didn’t fire. I need some conditions in my trigger, but what I’m reading isn’t making much sense as the documentation is snippets of code so I can’t see how things fit.
Ok - I’ve got this working… but here’s the thing… after the update has been applied… (a core update ran) … it doesn’t seem to run again in order to reset the input boolean. If I run it manually, then it works…but it doesn’t seem to re-run itself after the core update has applied and HA has restarted.
Grateful for thoughts please.
alias: Update available
description: ""
triggers:
- trigger: state
entity_id:
- update.advanced_ssh_web_terminal_update
to: "on"
from: null
id: update_present
- trigger: state
entity_id:
- update.digital_clock_update
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.esphome_device_compiler_update
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.file_editor_update
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.get_hacs_update
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.hacs_update
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.home_assistant_core_update
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.home_assistant_operating_system_update
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.home_assistant_supervisor_update
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.mosquitto_broker_update
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.music_assistant_server_update
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.office_presence
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.openwakeword_update
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.piper_update
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.snowboy_update
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.whisper_update
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.electric_blanket
id: update_present
to: "on"
from: null
- trigger: state
entity_id:
- update.soldering_iron
from: null
to: "on"
id: update_present
- trigger: state
entity_id:
- update.office_light
from: null
to: "on"
id: update_present
- trigger: state
entity_id:
- update.landing_light
id: update_present
from: null
to: "on"
- trigger: state
entity_id:
- update.tablet_power
id: update_present
to: "on"
from: null
conditions: []
actions:
- if:
- condition: trigger
id:
- update_present
then:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.notify_update
data: {}
else:
- action: input_boolean.turn_off
target:
entity_id: input_boolean.notify_update
data: {}
mode: single
I hopefully sorted this by adding a time trigger to the top. It will run every ten minutes and hopefully that should sort things. However, I am concerned that because the initial trigger is a change in update state… that a second trigger won’t capture that state and the condition will clear itself… so I might need to re-write it again to "to: “on” from: any state. Time will tell.