mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-17 14:26:51 +00:00
Add link to automation details and remove automation example
This commit is contained in:
parent
5d60db03d3
commit
34bf175f87
@ -16,28 +16,15 @@ Home Assistant currently supports a wide range of services for notifications. Pl
|
|||||||
If your are running into troubles with your notification platform, a simple way to test it is to use **Call Service** from the **Developer Tools**. 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**.
|
If your are running into troubles with your notification platform, a simple way to test it is to use **Call Service** from the **Developer Tools**. 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
|
```json
|
||||||
{"title":"Test", "message":"A simple test message from HA."}
|
{"message":"A simple test message from HA."}
|
||||||
```
|
```
|
||||||
|
|
||||||
This will send a single message to your notification platform configured in your `configuration.yaml` file.
|
This will send a single message to your notification platform configured in your `configuration.yaml` file.
|
||||||
|
|
||||||
## {% linkable_title Examples %}
|
| Service data attribute | Optional | Description |
|
||||||
|
| ---------------------- | -------- | ----------- |
|
||||||
|
| `title` | yes | Can be used to set a title for the message. The default is `Home Assistant`.
|
||||||
|
| `message` | no | Message to send to recipient.
|
||||||
|
|
||||||
### {% linkable_title Automation %}
|
|
||||||
|
|
||||||
Notifications are great to be used within Home Automation. Below is a an example configuration that you can add to your `configuration.yaml` file to be notified when the sun sets.
|
For more automation examples, see the [getting started with automation page](/getting-started/automation/) or the [configuration cookbook](/cookbook).
|
||||||
|
|
||||||
```yaml
|
|
||||||
automation:
|
|
||||||
alias: Sun set notification
|
|
||||||
|
|
||||||
platform: state
|
|
||||||
state_entity_id: sun.sun
|
|
||||||
state_from: above_horizon
|
|
||||||
state_to: below_horizon
|
|
||||||
|
|
||||||
execute_service: notify.NOTIFIER_NAME
|
|
||||||
service_data: {"message":"YAY"}
|
|
||||||
```
|
|
||||||
|
|
||||||
For more automation examples, see the [getting started with automation page]({{site_root}}/components/automation/).
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user