46 lines
1.8 KiB
Markdown
46 lines
1.8 KiB
Markdown
---
|
|
layout: component
|
|
title: "Notifications"
|
|
description: "Instructions how to add user notifications to Home Assistant."
|
|
date: 2015-01-20 22:36
|
|
sidebar: true
|
|
comments: false
|
|
sharing: true
|
|
footer: true
|
|
---
|
|
|
|
The `notify` component makes it possible to send notifications to a wide variety of platforms. Please check the sidebar for a full list of platforms that are supported.
|
|
|
|
## {% linkable_title Configuration %}
|
|
|
|
```yaml
|
|
# Example configuration.yaml entry
|
|
notify:
|
|
platform: pushbullet
|
|
# Optional name for the notify service
|
|
name: paulus
|
|
# api_key is a required config key by the pushbullet platform
|
|
api_key: ABCDEFG
|
|
```
|
|
|
|
The **name** parameter is optional but needed if you want to use multiple platforms. The platform will be exposed as service `notify/<name>`. The name will default to `notify` if not supplied.
|
|
|
|
### {% linkable_title Service %}
|
|
|
|
Once loaded, the `notify` platform will expose a service that can be called to send notifications.
|
|
|
|
| Service data attribute | Optional | Description |
|
|
| ---------------------- | -------- | ----------- |
|
|
| `message` | no | Body of the notification.
|
|
| `title` | yes | Title of the notification. Default is `Home Assistant`.
|
|
| `target` | yes | Some platforms will allow specifying a recipient that will receive the notification. See your platform page if it is supported.
|
|
|
|
### {% linkable_title Test if it works %}
|
|
|
|
A simple way to test if you have set up your notify platform correctly is to use **Call Service** from the **Developer Tools** to call your notify service. Choose your service (*notify/xyz*) from the list of **Available services:** and enter something like the sample below into the **Service Data** field and hit **CALL SERVICE**.
|
|
|
|
```json
|
|
{
|
|
"message": "A simple test message from HA."
|
|
}
|
|
```
|