Skip to content

Instantly share code, notes, and snippets.

@MagicMicky
Forked from Klumper/update_notification.yaml
Last active December 15, 2021 16:59
Show Gist options
  • Save MagicMicky/6588ff91871825c53552a6ad8b27822f to your computer and use it in GitHub Desktop.
Save MagicMicky/6588ff91871825c53552a6ad8b27822f to your computer and use it in GitHub Desktop.
Home Assistant update notification blueprint
blueprint:
name: Home Assistant update notification
description: Send a notification when there's an update availiable for Home Assistant
domain: automation
input:
updater:
name: Update sensor
description: The sensor which indicates if there's an update
selector:
entity:
domain: binary_sensor
notification_title:
name: Notification title (Optional)
description: 'Default: "Upgrade time!"'
default: "Upgrade time!"
notification_message:
name: Notification message (Optional)
description: 'Default: "Home Assistant {{ newest_version }} is available"'
default: "Home Assistant {{ newest_version }} is available"
delay:
name: Delay (Optional)
description: Wait before sending the notification
default:
selector:
number:
min: 0
max: 60
unit_of_measurement: seconds
mode: slider
trigger:
platform: state
entity_id: !input updater
from: "off"
to: "on"
variables:
updater: !input updater
newest_version: "{{ states[updater].attributes.newest_version }}"
release_notes: "{{ states[updater].attributes.release_notes }}"
notification_title: !input notification_title
notification_message: !input notification_message
delay: !input delay
action:
- delay: "{{ delay }}"
- service: persistent_notification.create
data:
title: "{{ notification_title }}"
message: "{{ notification_message }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment