Update notifications (Core, OS, Addons, HACS, etc)

Hi! Great blueprint - however, I do have a question/feature request - is there a way to change the target to be an email instead of a phone? I have an “smtp” platform email target already setup in my configuration that I use for other purposes; how can I either change the code to send the notification there instead?

So the reason I can’t do that is this is here:

That was in response to notification groups but everything I said applies to your use case as well. Basically I’m only able to do mobile app because I can cheat by using a device type selector to pick phones. There simply is no selector available for “notification services”. So I can’t make a selector for that and I can’t ensure whatever you put actually works.

If you want to change it for your personal use though that’s totally fine. Basically just copy it locally either as your own personal blueprint or refactor it into a normal automation. Then remove this section:

And replace with your notifier. The YAML anchor should take care of the rest.

Only other thing to watch out for is you cannot dismiss an email notification after the update is complete. So you’ll want to remove all the stuff about dismissing notifications. There’s a few places in there. Or alternatively leave them alone and let it send an email with the text dismiss_notification and use a filter to archive/delete the thread when that is received, that could work too. That’s basically what the mobile app does.

1 Like

Thank you! I’ll work on making my own copy - that seems to be the most straightforward solution for me!

Agreed, the Open link doesn’t seem to go to the proper place.

1 Like

…as we talk about “bugs” here, here’s a(nother) minor one:

One additional blank space before the “Installed…” text. Probably very easy to fix…

1 Like

For some time now the ‘Update’ button in the notification only starts updating the addon, but the notification doesn’t disappear and there’s no notification saying ‘Updating’. Then if I hit update again log says ‘no update for Update’ since it’s already updated. Ideas? The Update entities I’ve specified is ‘Home Assistant Core Update’, ‘Home Assistant Operating System Update’ and ‘Home Assistant Supervisor Update’.

I cannot select my device in the drop down, here is nothing listed. (but my phone is the only device with the app anyway).
With other automations, I am able to select my phone in the “device” drop down.
Any idea what I could check?

Nice! Looks good and now implemented.
One question and I’m sorry if I missed that somewhere, but is it correct that it doesn’t see section updates under Hacs?

image

1 Like

Thanks autor for this project!!!

A little bit correcting the yaml file of this project

Add a switch, now possible send notification to telegram (telegram must be added to home assistant configuration file)

On telegram looks great:

link on github

3 Likes

Hey @CentralCommand

I am still experiencing the above issue, just wondering if you are too (see the reply)

This is my configuration:

alias: Update notifications
description: ""
use_blueprint:
  path: mdegat01/update_notifications.yaml
  input:
    reminder_hours: "6"
    mobile_app_device: c3be379f5150396ba4631fa0ba3991ab
    only_after: "00:00:00"
    only_before: "00:00:00"
    update_entities:
      - update.home_assistant_core_update
      - update.home_assistant_supervisor_update
      - update.appdaemon_update
      - update.home_assistant_google_drive_backup_update
      - update.influxdb_update
      - update.log_viewer_update
      - update.mariadb_update
      - update.mosquitto_broker_update
      - update.node_red_update
      - update.ring_mqtt_with_video_streaming_update
      - update.studio_code_server_update
      - update.tasmoadmin_update
      - update.zigbee2mqtt_update
    status_bar_icon: mdi:home-assistant
    changelog_urls:
      update.appdaemon_update: https://github.com/hassio-addons/addon-appdaemon/releases
      update.home_assistant_google_drive_backup_update: https://github.com/sabeechen/hassio-google-drive-backup/releases
      update.influxdb_update: https://github.com/hassio-addons/addon-influxdb/releases
      update.log_viewer_update: https://github.com/hassio-addons/addon-log-viewer/releases
      update.mariadb_update: >-
        https://github.com/home-assistant/addons/blob/7dab96512c6fca69a33004f75838a90a51efa25c/mariadb/CHANGELOG.md
      update.mosquitto_broker_update: >-
        https://github.com/home-assistant/addons/blob/7dab96512c6fca69a33004f75838a90a51efa25c/mosquitto/CHANGELOG.md
      update.node_red_update: https://github.com/hassio-addons/addon-node-red/releases
      update.ring_mqtt_with_video_streaming_update: https://github.com/tsightler/ring-mqtt-ha-addon/blob/bf780e608d7ffcf9f3f14e3ba4e644a3467bd352/CHANGELOG.md
      update.studio_code_server_update: https://github.com/hassio-addons/addon-vscode/releases
      update.tasmoadmin_update: https://github.com/hassio-addons/addon-tasmoadmin/releases
      update.zigbee2mqtt_update: >-
        https://github.com/zigbee2mqtt/hassio-zigbee2mqtt/blob/1c1dba19f59c7a760198e866a893db21215e5db4/zigbee2mqtt/CHANGELOG.md
    notification_channel: Updates

Any thoughts?
Rob

This project looks amazing! I installed it and I got an update around 10 minutes later! :rofl:
I also installed the scheduled updates blueprint. I added a toggle to pause the scheduled updates. When your blueprint notifies me I can now choose to install the update or I can hit the toggle and the updates should install early the next morning. Now I just have to figure out how to interact with the toggle from the notification. When combine the two blueprints create an awesome automation team!

1 Like

My automation isn’t sending notices. Getting this error in the automation trace:
UndefinedError: No first item, sequence was empty.

It seemed like that was related to the global check every X hours, so I disabled that. It was failing on my Unifi AP that has an update entity.

Now the trace just falls through to the bottom with no actions taken.

There is a pending update that I confirmed is in the monitored list. I went and made it the only item in the list, but no change.

auto_update: false
installed_version: v2.3.1
in_progress: false
latest_version: v2.4.0
release_summary: null
release_url: https://github.com/artem-sedykh/mini-climate-card/releases/v2.4.0
skipped_version: null
title: null
friendly_name: mini climate card update
supported_features: 21

@Quacked I am having this same issue.
The update is actually performing but it is not clearing the notification.

Having a quick look, I could not find the issue.
I am running HA Container, so this is only really for HACS updates.

Did you find a solution?

Or has anyone else had the same problem?

Haven’t found a solution, no. :confused:

If it helps, I see the following error messages in my log:

2022-11-10 03:00:00.015 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No first item, sequence was empty. when rendering '{{ device_attr(entity_id, 'identifiers') | first }}'
2022-11-10 03:00:00.018 ERROR (MainThread) [homeassistant.components.automation.notification_for_updates] notification_for_updates: Choose at step 1: Send reminders if enabled: Loop over updates and send reminder: Error executing script. Error rendering template for variables at pos 2: UndefinedError: No first item, sequence was empty.
2022-11-10 03:00:00.019 ERROR (MainThread) [homeassistant.components.automation.notification_for_updates] notification_for_updates: Choose at step 1: Send reminders if enabled: Error executing script. Error rendering template for repeat at pos 2: UndefinedError: No first item, sequence was empty.
2022-11-10 03:00:00.021 ERROR (MainThread) [homeassistant.components.automation.notification_for_updates] notification_for_updates: Error executing script. Error rendering template for choose at pos 1: UndefinedError: No first item, sequence was empty.
2022-11-10 03:00:00.022 ERROR (MainThread) [homeassistant.components.automation.notification_for_updates] Error while executing automation automation.notification_for_updates: UndefinedError: No first item, sequence was empty.

Finally had a chance to look in to it a bit more…

I noticed it only auto-clears the notification for the update entities that are explicitly listed, not any of them.

I’ve just listed them all and seems to work ok now.

I have the following error in my system logs:

2022-11-17 08:45:34.258 ERROR (MainThread) [homeassistant.components.automation] Blueprint Update notifications generated invalid automation with inputs OrderedDict([('reminder_hours', '6'), ('update_entities', ['update.access_point_garage', 'update.access_point_living', 'update.access_point_slaapkamer', 'update.afvalbeheer_update', 'update.anniversaries_update', 'update.auto_backup_update', 'update.daikin_residential_controller_update', 'update.garmin_connect_update', 'update.hacs_update', 'update.mini_media_player_update', 'update.soers_network', 'update.sonos_cloud_update', 'update.switch_24_garage', 'update.switch_8_garage', 'update.switch_8_garage_camnet', 'update.switch_8_living', 'update.thuis_nas01_dsm_update', 'update.toon_smart_meter_update', 'update.tesla_update', 'update.mister_t_software_update', 'update']), ('mobile_app_device', 'f1e469f41a3ad819a0b437bcb88b7d9d'), ('take_backup', False), ('run_config_check', True), ('only_after', '08:00:00'), ('only_before', '20:00:00')]): Entity update is neither a valid entity ID nor a valid UUID for dictionary value @ data['entity_id']. Got None

@CentralCommand
The blueprint doesn’t change the notification to “updating…” for HACS updates.

This is because the in_progress attribute changes to a number (% done), rather than true. A simple fix is done by making the following changes under the ‘started’ trigger:

To confirm, I have tested this and it works.
Let me know if this was already considered and I have tried to enhance a conscious decision.

2 Likes

@joshward9182 What’s the easiest way to implement this fix? Fork it and use your own fork as blueprint?

@CentralCommand any reason the fix isn’t used in your BP?

The easiest way is probably to install the blueprint as it is and manually edit the yaml file in your config folder.
It’s in /config/blueprints/automation/jcwillox/automatic_backups.yaml

1 Like