mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 16:27:19 +00:00
Updating examples (#6576)
* Updating examples It's not very helpful that our examples are all for the services menu. Providing automation examples. * Update notify.markdown
This commit is contained in:
parent
b6356768bc
commit
a1cdeaf43a
@ -55,6 +55,16 @@ A simple way to test if you have set up your notify platform correctly, is to us
|
||||
"message": "The sun is {% raw %}{% if is_state('sun.sun', 'above_horizon') %}up{% else %}down{% endif %}{% endraw %}!"
|
||||
}
|
||||
```
|
||||
|
||||
The automation equivalent would be:
|
||||
|
||||
```yaml
|
||||
action:
|
||||
service: notify.notify
|
||||
data:
|
||||
message: "The sun is {% raw %}{% if is_state('sun.sun', 'above_horizon') %}up{% else %}down{% endif %}{% endraw %}!"
|
||||
```
|
||||
|
||||
For services which have support for sending images.
|
||||
|
||||
```json
|
||||
@ -67,6 +77,19 @@ For services which have support for sending images.
|
||||
}
|
||||
```
|
||||
|
||||
The automation equivalent would be:
|
||||
|
||||
```yaml
|
||||
action:
|
||||
service: notify.notify
|
||||
data:
|
||||
message: "Test plugin"
|
||||
data:
|
||||
photo:
|
||||
url: "http://www.gbsun.de/gbpics/berge/berge106.jpg"
|
||||
```
|
||||
|
||||
|
||||
If the service support sending the location, the data from this sample can be used.
|
||||
|
||||
```json
|
||||
@ -80,3 +103,15 @@ If the service support sending the location, the data from this sample can be us
|
||||
}
|
||||
```
|
||||
|
||||
The automation equivalent would be:
|
||||
|
||||
```yaml
|
||||
action:
|
||||
service: notify.notify
|
||||
data:
|
||||
message: "Test plugin"
|
||||
data:
|
||||
location:
|
||||
latitude: 7.3284
|
||||
longitude: 46.38234
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user