Fancy Home Assistant Update Available Notifier for Android (With customizable notification settings)

Hi forte, your automation didnt trigger this morning to notify the 2021.12.6 update. Any idea what could be wrong?

alias: Home Assistant Update Notification for Android
description: ''
use_blueprint:
  path: fortepc/update-notif-for-android.yaml
  input:
    clickAction: https://my.home-assistant.io/redirect/supervisor/
    delay: 0
    group: Available Updates
    include_hasspodcast: true
    importance: high
    color: homeassistant
    notify_device: 8276fa3f8ddf01425be9d696f649d47d
    category: Home Assistant Updates
    notification_message: Home Assistant {{ newest_version }} is available

The device id for notifying is definitely correct (i chose my mobile device in the visual editor).

i also cannot see any errors in the logs. And the history shows it did not trigger.

Many thanks.

Hm… Seems like for whatever reason the automation may have missed the update becoming available. If the binary sensor changes from off to on before the automation is loaded (when starting up for example) then the automation wouldn’t trigger. It only triggers on the binary sensor changing. I just confirmed this by rebooting my HA while that binary sensor was already on, and after boot up it did not trigger.

If this is a major problem, I can probably update it by adding in a few extra triggers. There were a couple of updates I wanted to do to this blueprint anyway, so try to work that in too, in addition to the persistent option from before too.

Hi forte, thanks for checking. It would be awesome if you update your blueprint but it’s already awesome. I don’t really know if it was booting at that moment. I don’t think so but I can’t be sure. I alwaysanually update HA so I don’t think it was booting. Anyway. I’ll see if it works with the next update. Thanks again for looking into this. Do you think you could also add triggers to check updates for add ons?

I’ve been wanting to update it anyway, but as for the Add-Ons notifier, there was actually someone who already forked this and modified it to work with add-ons! It works amazingly!

It’s what I’m using for Add-ons. It even supports updating with a button press with the hassio.addon_update service call.

Just make sure you update these fields here, so they group correctly with this blueprint. This is what you’ll set it to if you’ve left my blueprint at defaults, or just make sure you set it to the same as however you set your automation with my blueprint

oh cool, thanks! will try now. :slight_smile:

1 Like

ok installed it now. this is super cool. but looks like i need to setup an automation for each add-on individually, right? I have so many addons. i used to have one simple automation that checked whether any addon had an update and sent a notification, but it stopped working some while ago…

1 Like

That is correct, unfortunately :sweat_smile:

Hi forte, I just saw now that there is a new HA update and my automation again didnt work.
I think theres something wrong with my setup,

i think i figured out the issue. my binary_sensor.updater entity was off for some reason. i turned it on in the developer tools. now the trace function for the automation also works. before it didnt show anything. so hopefully it works from now on :slight_smile:

1 Like

Is anybody else having issues with this blueprint by chance? I’m getting this error in my logs and I’m assuming I have something misconfigured:

Template variable warning: 'persistent_notification' is undefined when rendering '{{ persistent_notification }}'

I’m also getting a bunch of errors when using the addon update blueprint as well:

Template variable error: 'dict object' has no attribute 'to_state' when rendering '{{ trigger.to_state.state == "on" }}'
Error in 'choose[0]' evaluation: In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state'

Yes here problems a well… 50% it pops up, 50% not…

That warning is expected if you’ve got persistent_notification turned off in the config for the blueprint, I don’t think that was an issue when I originally wrote the blueprint, but something may have updated since then. I probably could have done that a bit better to avoid that that warning popping up, but the automation should still fire without issue unless something changed on Home Assistant’s side to be more strict about templates. If it’s not I can try to re-write that part to. Just let me know :slight_smile:

Ah ok awesome I can confirm it still fires even with that warning. That’s good to know, and thanks again for writing this awesome blueprint much appreciated! :slight_smile: Now I just need to figure out how loop it assuming it doesn’t already and get it to be a persistent notification :wink:

1 Like

Is there a way to have this automation loop and keep checking the binary_sensor.updater to see if it’s state is ‘on’? The automation didn’t fire today when there was an update available and I see you mentioned that if the sensor changes to on before the blueprint/automation sees it, it doesn’t fire.

Now that home assistant has the Update entities for this, I’ll be re-vamping this blueprint to use those instead. But no promise on timeframe.

2 Likes

Great! Because the current one is not very reliable anymore… misses around 30-40%