Now that 2022.4.0
has come out with its update entities I decided to see if I could convert my update notifications package into a single blueprint. Turns out the answer is yes! Notifications about all your updates, and install them right from the notifications!
Dependencies
HA version >= 2022.4.0
. Otherwise you won’t have any update
entities.
HACS version >= 1.24.1
and enable experimental features if you want update notifications for HACS components. Will update when this feature is pushed to HACS stable.
Features
- Receive a notification on up to two devices every time a listed update entity becomes on.
- Notifications all include the following features:
- New version
- Current version
- Link to open item
- Update action
- Skip action
- Entity picture as icon (if available in entity)
- Release summary (if available and as much as fits)
- Changelog link (if available)
- Notification switches to “updating…” when update is in progress to let you know
- Notification is automatically dismissed when update is complete
- IOS and android supported (normalized to look and work as identically as I can get them on each)
- Can create a persistent notification as well. Text is identical to others and dismissed on complete. Includes open and (if available) changelog links
- Choose whether update action takes a partial backup or not
- Can optionally start the config check addon when an update for core is available. If so notification text will be updated to let you know when that addon finished running so you can check it.
- Can send reminders about all available updates every X hours (configurable)
- Option to provide changelog links for update entities which don’t have them (addons) so your notifications can still include them.
- Can limit when notifications are sent to mobile devices with a time window (still sent to HA at all hours if you choose to make a persistent notification as well)
Improvements
Definitely room for improvement still. The biggest things in my mind are these:
1. Don’t make users list update entities to watch, just watch them all.
2. Allow users to provide a list of devices to send notifications too instead of supporting a specific number
EDIT: After talking through it with @Sir_Goodenough below I think we’re good on #1. I forgot the polling loop I added (reminder_hours
) will send you a notification about any available update, not just the ones you listed in update_entities
. So update_entities
is just for the updates you want to know about immediately. And core if you want to use the “run config check when a core update is available” feature. All others this will inform you about every x hours (whatever you put in reminder_hours
)
Date of last update - 5/6/2022
Changelog
Update 5/6/2022
Enhancements
- Emulating android’s sticky notification feature for ios notifications by recreating the notification when the changelog action is selected (per request here)
Update 5/5/2022
Bug fixes
- Existence check in template was causing a warning, no more warning
Update 5/2/2022
Bug fixes
- Reminder hours set to
None
does not cause error
Update 4/14/2022
Bug fixes
- Using a proper if statement to prevent errors on install/skip actions in android. Note to self:
default
doesn’t shortcircuit
Update 4/13/2022
Enhancements
- Added new input for
status_bar_icon
to allow users to choose one besidesmdi:package-up
Bug fixes
- Fixed install action not working on IOS, action no longer coming in as
trigger.event.data.actionName
- Core and OS updates breaking if other entities besides
update
one enabled after removing filter in earlier fix. Now properly finding theupdate
entity for these no matter what is enabled.
Update 4/11/2022
Enhancements
- Added
notification_channel
option so users can set the channel (android) and group (ios) used for update notifications. Defaults toUpdates
Bug fixes
-
Updates
channel used for android notifications by default (user-overridable) - No skip action on supervisor updates since its not skippable
- When installing an update from a notification action for something other then an addon or core always set
backup: false
regardless of the value of thetake_backup
input since its not supported.
Update 4/9/2022
Enhancements
- Added
only_before
andonly_after
options. When used notifications will only be sent to specified mobile devices in the specified time window
Bug fixes
- OS and Core notifications were only being dismissed on startup if you had listed those entities in
update_entities
. Since that’s not required to get notifications for them, always dismissing for these entities on startup when they areoff
. - Core update notification doesn’t switch back to saying “core check has started” on next reminder after check completed for users of the
run_core_check
feature