Created
July 22, 2022 10:42
-
-
Save MarcStocker/3ce8ddbd189cd401f2286c62a36b160b to your computer and use it in GitHub Desktop.
Mobile Notification - Home Assistant Update Available
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Notify - Home Assistant Update Available | |
description: Send a mobile notificaiton that a new HA Core Update is available | |
domain: automation | |
input: | |
notify_device: | |
name: Notify Device | |
description: The device must run the official Home Assistant app to receive notifications. | |
default: false | |
selector: | |
device: | |
integration: mobile_app | |
default_url: | |
name: Default URL | |
description: > | |
The default page the notification will 'open to..' | |
default: "/config/updates" | |
msg_title: | |
name: Message Title | |
description: Title of the Notifcation | |
default: "Update Available ({{ state_attr('update.home_assistant_core_update', 'latest_version') }})" | |
selector: | |
text: | |
msg_message: | |
name: Message text | |
description: Notification Message Text | |
default: "Current Version: {{ state_attr('update.home_assistant_core_update', 'installed_version') }}" | |
selector: | |
text: | |
button_1_title: | |
name: Button 1 Text | |
description: Display Text for button 1 | |
default: "🔄 Backups" | |
selector: | |
text: | |
button_1_uri: | |
name: Button 1 URI | |
description: URI/URL to navigate to when pressed | |
default: "/hassio/backups" | |
selector: | |
text: | |
button_2_title: | |
name: Button 2 Text | |
description: Display Text for button 2 | |
default: "🏠 Blog" | |
selector: | |
text: | |
button_2_uri: | |
name: Button 2 URI | |
description: URI/URL to navigate to when pressed | |
default: "https://www.home-assistant.io/latest-release-notes/" | |
selector: | |
text: | |
button_3_title: | |
name: Button 3 Text | |
description: Display Text for button 3 | |
default: "ℹ️ HA Info" | |
selector: | |
text: | |
button_3_uri: | |
name: Button 3 URI | |
description: URI/URL to navigate to when pressed | |
default: "/config/info" | |
selector: | |
text: | |
image: | |
name: (Optional) Image | |
description: Include an image if you really want to. Not really necessary for this type of notificaiton, but you do you.<br>(Can be a URL, or local media such as /media/aphoto.png) | |
default: "" | |
selector: | |
text: | |
noti_tag: | |
name: Notifcation Tag | |
description: Docs:<br>https://companion.home-assistant.io/docs/notifications/notifications-basic#replacing | |
default: ha_core_update | |
selector: | |
text: | |
noti_group: | |
name: Notifcation group | |
description: Docs:<br>https://companion.home-assistant.io/docs/notifications/notifications-basic#grouping | |
default: Update-Notifications | |
selector: | |
text: | |
noti_channel: | |
name: Notifcation group | |
description: "Useful for assigning custom notification sounds. <br>https://companion.home-assistant.io/docs/notifications/notifications-basic#notification-channels" | |
default: HA Updates | |
selector: | |
text: | |
trigger: | |
- platform: state | |
entity_id: | |
- update.home_assistant_core_update | |
to: "on" | |
action: | |
- device_id: !input notify_device | |
domain: mobile_app | |
type: notify | |
title: !input msg_title | |
message: !input msg_message | |
data: | |
### Android Specific | |
# Set a page to open to when notification is clicked | |
# [https://companion.home-assistant.io/docs/notifications/notifications-basic#opening-a-url] | |
clickAction: "/config/updates" | |
# Set an image, if you like | |
image: !input image | |
### iOS Specific | |
# Set a page to open to when notification is clicked | |
# [https://companion.home-assistant.io/docs/notifications/notifications-basic#opening-a-url] | |
url: "/config/updates" | |
# Set an image, if you like | |
attachment: | |
url: !input image | |
# Notification Organizing | |
tag: !input noti_tag # Only one of this notification can, and should exist | |
group: !input noti_group # Notifications with this group will be minimized/grouped with each other, instead of with all other HA notifications | |
channel: !input noti_channel # Assign's a "Category" for custom notification sounds | |
# Provide additional action buttons within the notification | |
actions: | |
- action: URI | |
title: !input button_1_title | |
uri: !input button_1_uri | |
- action: URI | |
title: !input button_2_title | |
uri: !input button_2_uri | |
- action: URI | |
title: !input button_3_title | |
uri: !input button_3_uri |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment