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 recipient: recipient@jabber.org
automation: automation:
- alias: Update notifications - alias: Update notification
trigger: trigger:
- platform: state - platform: state
entity_id: updater.updater entity_id: binary_sensor.updater
from: 'off'
to: 'on'
action: action:
service: notify.jabber - service: notify.jabber
data: data:
message: 'There is a new Home Assistant release available.' 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. 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 ```yaml
notify: notify:
platform: pushbullet - platform: pushbullet
api_key: 'YOUR_KEY_HERE' api_key: 'YOUR_KEY_HERE'
name: pushbullet name: pushbullet
automation: automation:
- alias: Update notifications - alias: Update notification
trigger: trigger:
- platform: state - platform: state
entity_id: updater.updater entity_id: binary_sensor.updater
action: from: 'off'
service: notify.pushbullet to: 'on'
data_template: action:
title: 'New Home Assistant Release' - service: notify.pushbullet
target: 'YOUR_TARGET_HERE' #See Pushbullet integration for usage data_template:
message: "Home Assistant {% raw %} {{ states('updater.updater') }} {% endraw %} is now available." 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."
``` ```