Update example following #9957 (#10086)

Update example following updater changes in Home-Assistant #25418
This commit is contained in:
mbo18 2019-08-08 20:28:12 +02:00 committed by Franck Nijhof
parent bf4cf20ba0
commit 8a0dff1ff2

View File

@ -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."
```