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:
DubhAd 2018-10-07 10:42:06 +01:00 committed by Franck Nijhof
parent b6356768bc
commit a1cdeaf43a

View File

@ -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
```