Fixed. Uses Updates
by default for channel (android) and group (ios). Also a new input to allow users to change that if they want.
Hm ok, I guess looking at the doc you’re right. It is close enough to android that sending the same thing to both does probably work. I’ll think about it but I really don’t like the lack of selector for it. I worry it just introduces a lot of potential for bugs where the blueprint now accepts a notification service that doesn’t work because it has a far different feature set then mobile application.
I think for now I’m going to leave it off. But I would definitely suggest making or pushing up a feature request to get a selector specficially for notification services. Or to have core create a device with a “Send Notification” device action when you subscribe for HTML5 notifications like how the mobile app works. Either one allows me to create a selector that I can be sure only shows users options that have been tested and work.
Thanks Mike for implementing it.
Any idea how HACS is currently tracked, I don’t think they added the update entity as of now, so i guess that will be their next step right?
Actually they do already. But only if you enable experimental features, hasn’t been pushed to stable yet. I should probably mention that at the top though
But yea if you turn that on then you get update entities for all those too. I have it enabled and tested, has all been working great.
Off topic but relevant, is there a way to get an update notification if your Blueprint (or other Blueprints) is changed?
If I understand correctly, I have to copy new (version) code from GitHub and reload the Blueprint to get the latest version(?)
I’m not really aware of one unfortunately, I wish it was less of a hassle. There’s a feature request to make it easier but no current solutions I’m aware of.
That being said, poking around a bit, a call to https://api.github.com/gists/13d91bc293e8b98cba2c9ee932527dea gets everything needed to do this for my particular blueprint. There’s a version ID and date of last update in there you could use to notify about an update to the blueprint. Even the raw blueprint data is in there if you wanted to make a shell_command or command_line.notify which pulls that in and uses it to update the file.
The bummer is you’d have to make the senors and services per each blueprint you use. And only for blueprints which are hosted as gists, don’t really think there’s a solution for blueprints where the code is just embedded in the top post of a forum thread. But at least for this one I think something could be built out of a command_line.sensor and a shell_command.
PLEASE go to and vote up that feature request if you can.
This is a blueprint creator and user sore point and people complain it doesn’t exist, but then don’t poke the bear to get the feature worked on…
Feature Request
I moved my 8 blueprints from a gist to a repo and am (hoping) that a solution like HACS has or like Luma proposed in the FR would come to pass. The repo is easier when you have 8 of them than individual gists were… I then have a markdown file in the repo that is also the Blueprint Exchange post here, so edit it in VSCode, overwrite the top post here, and all documentation is up to date and matching…
Hiya, I’m an update freak and this is what I was really looking for! You actually overachieve it and include more useful stuff (such as the config check!). However I am having some issues, if I enable “take backup” the update doesn’t actually run and it comes back with the below error on the logs:
Logger: homeassistant.components.automation.notify_new_update
Source: helpers/script.py:1397
Integration: Automation (documentation, issues)
First occurred: 22:07:17 (4 occurrences)
Last logged: 22:07:17
Notify - New update: Choose at step 1: Install update action: Error executing script. Error for call_service at pos 1: Backup is not supported for Tapo: Cameras Control update
Notify - New update: Error executing script. Error for choose at pos 1: Backup is not supported for Tapo: Cameras Control update
Removing this options let’s me run the update from the notification (android). Perhaps it should have a bypass for add-ons/integrations that don’t support backups but I wouldn’t know how to do it…
In addition to this, having the option “config check” on or off doesn’t make any difference. With it on it just doesn’t work as expected, no message comes up saying it’s running nor when completed.
Apart from that, the rest is running smoothly
Thanks!
Oh shoot I actually didn’t know that, thanks for letting me know! I thought it would just ignore that option if backup wasn’t supported by a particular update entity.
Ok I just fixed it. Now it will only use the value of the take_backup
input if what you are updating is an addon or core, it will ignore it for everything else.
If you did this, thanks. I see someone has changed it.
Whomever has changed it, thanks!
Yea that was me. Was glad to find out about it, definitely handy.
I noticed the following error/warning: (Line 279 in the blueprint)
2022-04-13 10:24:35 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: No first item, sequence was empty. when rendering '{{ os_update_entity != '' and expand(os_update_entity) | first | attr('state') == 'off' }}'
2022-04-13 10:24:35 WARNING (MainThread) [homeassistant.helpers.script] Error in 'choose[0]' evaluation: In 'template' condition: UndefinedError: No first item, sequence was empty.
I’m btw very happy with the blueprint! Great work!
Huh, interesting I haven’t seen that. Would you mind putting this template in the templates tab of developer tools and sharing the result? This is what is used to set os_update_entity
:
{% for u in integration_entities('hassio')
if (device_attr(u, 'identifiers') | first)[1] == 'OS' %}
{{ u }}
{% endfor %}
It seems like the value of that attribute isn’t blank but also isn’t the ID of an update entity. I’m confused how that could be…
@CentralCommand Thank you for this awsome blueprint, just picked up a bug or at lease I think it might be, I tried to update from my ios device, but the trigger event was not ‘install_ios’ but instead ‘install’ and then it failed setting the update entityId.
- variables:
entity_id: &tag-to-entity >-
update.{{ trigger.event.data.action_data.tag if trigger.id[-3:] == 'ios' else trigger.event.data.tag }}
Result is: update. instead of update.home_assistant_core_update
Trigger data:
trigger:
id: install
idx: '3'
platform: event
event:
event_type: mobile_app_notification_action
data:
action: install-update
action_data:
tag: home_assistant_core_update
origin: REMOTE
time_fired: '2022-04-13T15:31:06.846515+00:00'
context:
id: SuperSecretIdHere
parent_id: null
user_id: SuperSecretIdHere
description: event 'mobile_app_notification_action'
Hope you can Help, love this blueprint, will be replaceing 3 automations of mine, lol.
Oh, huh. So to my knowledge any time an action was clicked in ios which the action identifier came back in trigger.event.data.actionName
. But in android it would come back in trigger.event.data.action
. This was happening as recently as a week ago for me, I actually commented on an old discussion with all the inconsistencies I found between ios and android here and that was one of them.
But now today I’m testing and suddenly ios is stuffing the selected action in trigger.event.data.action
as well. Which honestly is great, I’m glad there’s consistency in this. But leaves me a bit confused as to what happened. I don’t see a PR about this in the past week…
Anyway thanks for bringing it to my attention. I will fix it. I might leave the code in there to handle action
or actionName
since I’m still still a bit skeptical how this changed. But I’ll make sure it works for the event data ios appears to be returning now.
Thank you, sorry new to blueprints. Will I be notified if you update the blueprint or do I need to reimport it once you made changes?
The result:
update.home_assistant_operating_system_update
binary_sensor.home_assistant_operating_system_update_available
sensor.home_assistant_operating_system_version
sensor.home_assistant_operating_system_newest_version
right, I disabled all the other entities besides the update one there on my system. Obviously not everyone does that.
@DickSwart @erik7 updated with fixes for both of these issues, sorry about that.
Unfortunately no. There’s no notifications and you need to reimport after. It’s a bit frustrating I know, we had a bit of a discussion on it here. There’s an FR to improve this, please vote for it!
Upvoted and DUDE you the shit! thank you. Will test now and give feedback about my issue