home-assistant.io/source/_cookbook/notify_if__new_ha_release.markdown
David 7717e4a40c Update notify_if__new_ha_release.markdown (#2228)
A template requires the use of `data_template` instead of `data` for the template to be rendered (instead of resulting in an error).
2017-03-11 10:52:30 +01:00

1.5 KiB

layout, title, description, date, sidebar, comments, sharing, footer, ha_category
layout title description date sidebar comments sharing footer ha_category
page Send notification if new Home Assistant release Basic example of how to send a notification if a new Home Assistant release is available 2016-07-17 10:00 true false true true Automation Examples

The following example sends a notification via XMPP if a new Home Assistant release is available:

notify:
  - platform: xmpp
    name: jabber
    sender: sender@jabber.org
    password: !secret xmpp_password
    recipient: recipient@jabber.org

automation:
  - alias: Update notifications
    trigger:
      - platform: state
        entity_id: updater.updater
    action:
      service: notify.jabber
      data:
        message: 'There is a new Home Assistant release available.'

You can use templates to include the release number of Home Assistant if you prefer. The following example sends a notification via Pushbullet with the Home Assistant version in the message.

notify:
  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 component for usage
      message: "Home Assistant {% raw %} {{ states.updater.updater.state }} {% endraw %} is now available."