mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 16:56:50 +00:00
Update example following updater changes in Home-Assistant #25418
This commit is contained in:
parent
bf4cf20ba0
commit
8a0dff1ff2
@ -15,34 +15,38 @@ notify:
|
||||
recipient: recipient@jabber.org
|
||||
|
||||
automation:
|
||||
- alias: Update notifications
|
||||
- alias: Update notification
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: updater.updater
|
||||
entity_id: binary_sensor.updater
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
service: notify.jabber
|
||||
data:
|
||||
message: 'There is a new Home Assistant release available.'
|
||||
- service: notify.jabber
|
||||
data:
|
||||
message: 'There is a new Home Assistant release available.'
|
||||
```
|
||||
|
||||
You can use [templates](/topics/templating/) to include the release number of Home Assistant if you prefer. The following example sends a notification via [Pushbullet](/components/notify.pushbullet/) with the Home Assistant version in the message.
|
||||
|
||||
```yaml
|
||||
notify:
|
||||
platform: pushbullet
|
||||
api_key: 'YOUR_KEY_HERE'
|
||||
name: pushbullet
|
||||
- platform: pushbullet
|
||||
api_key: 'YOUR_KEY_HERE'
|
||||
name: pushbullet
|
||||
|
||||
automation:
|
||||
- alias: Update notifications
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: updater.updater
|
||||
action:
|
||||
service: notify.pushbullet
|
||||
data_template:
|
||||
title: 'New Home Assistant Release'
|
||||
target: 'YOUR_TARGET_HERE' #See Pushbullet integration for usage
|
||||
message: "Home Assistant {% raw %} {{ states('updater.updater') }} {% endraw %} is now available."
|
||||
- alias: Update notification
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.updater
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
- service: notify.pushbullet
|
||||
data_template:
|
||||
title: 'New Home Assistant Release'
|
||||
target: 'YOUR_TARGET_HERE' #See Pushbullet integration for usage
|
||||
message: "Home Assistant {% raw %} {{ state_attr('binary_sensor.updater', 'newest_version') }} {% endraw %} is now available."
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user