Replaced examples (#6577)

The examples were only for the services menu, which is unhelpful for users. Replaced with equivalent automation versions.
This commit is contained in:
DubhAd 2018-10-07 10:37:51 +01:00 committed by Franck Nijhof
parent 15db244e12
commit b6356768bc

View File

@ -35,69 +35,66 @@ notify:
Message to two devices with formatted text. Message to two devices with formatted text.
```json
{ ```yaml
"title": "Test to 2 devices", action:
"message": "Attention [b]bold[/b] text[br][url=https://www.pushsafer.com]Link to Pushsafer[/url]", service: notify.notify
"target": ["1111", "2222"], data:
"data": { title: "Test to 2 devices"
"icon": "2", message: "Attention [b]bold[/b] text[br][url=https://www.pushsafer.com]Link to Pushsafer[/url]"
"iconcolor": "#FF0000", data:
"sound": "2", icon: "2"
"vibration": "1", iconcolor: "#FF0000"
"url": "https://www.home-assistant.io/", sound: "2"
"urltitle": "Open Home Assistant", vibration: "1"
"time2live": "0" url: "https://www.home-assistant.io/"
} urltitle: "Open Home Assistant"
} time2live: "0"
``` ```
Message to one device with formatted text and image from an external URL. Message to one device with formatted text and image from an external URL.
```json ```yaml
{ action:
"title": "Test to 1 device with image from an url", service: notify.notify
"message": "Attention [i]italic[/i] Text[br][url=https://www.home-assistant.io/]Testlink[/url]", data:
"target": ["1111"], title: "Test to 1 device with image from an url"
"data": { message: "Attention [i]italic[/i] Text[br][url=https://www.home-assistant.io/]Testlink[/url]"
"icon": "14", data:
"iconcolor": "#FFFF00", icon: "14"
"sound": "22", iconcolor: "#FFFF00"
"vibration": "3", sound: "22"
"url": "https://www.home-assistant.io/", vibration: "31"
"urltitle": "Open Home Assistant", url: "https://www.home-assistant.io/"
"time2live": "60", urltitle: "Open Home Assistant"
"picture1": { time2live: "60"
"url":"https://www.home-assistant.io/images/components/alexa/alexa-512x512.png" picture1:
} url: "https://www.home-assistant.io/images/components/alexa/alexa-512x512.png"
}
}
``` ```
Message to two devices and one device group with formatted text and local image. Message to two devices and one device group with formatted text and local image.
```json ```yaml
{ action:
"title": "Test to 3 devices with local image", service: notify.notify
"message": "Attention [i]italic[/i] Text[br][url=https://www.home-assistant.io/]Testlink[/url]", data:
"target": ["1111","2222","gs3333"], title: "Test to 3 devices with local image"
"data": { message: "Attention [i]italic[/i] Text[br][url=https://www.home-assistant.io/]Testlink[/url]"
"icon": "20", target: ["1111","2222","gs3333"],
"iconcolor": "#FF00FF", data:
"sound": "33", icon: "20"
"vibration": "0", iconcolor: "#FF00FF"
"url": "https://www.home-assistant.io/", sound: "33"
"urltitle": "Open Home Assistant", vibration: "0"
"time2live": "10", url: "https://www.home-assistant.io/"
"priority": "2", urltitle: "Open Home Assistant"
"retry": "60", time2live: "10"
"expire": "600", priority: "2"
"answer": "1", retry: "60"
"picture1": { expire: "600"
"path":"C:\\Users\\Kevin\\AppData\\Roaming\\.homeassistant\\image-760-testimage.jpg" answer: "1"
} picture1: {
} path: "C:\\Users\\Kevin\\AppData\\Roaming\\.homeassistant\\image-760-testimage.jpg"
}
``` ```
To customize your push-notification you can take a look at the [Pushsafer API description](https://www.pushsafer.com/en/pushapi). To customize your push-notification you can take a look at the [Pushsafer API description](https://www.pushsafer.com/en/pushapi).