Fix syntax and clarify some things

This commit is contained in:
Robbie Trencheny 2017-04-16 15:02:36 -07:00 committed by GitHub
parent 50e6ce4f52
commit b830c194a0

View File

@ -13,18 +13,12 @@ redirect_from: /ecosystem/ios/notifications/
The `ios` notify platform enables sending push notifications to the Home Assistant iOS app. The `ios` notify platform enables sending push notifications to the Home Assistant iOS app.
The 'ios' component will automatically load the notify service. The 'ios' component will automatically load the notify service.
The service component can be called using `service: notify.ios.<your_device_name>`. The service component can be called using `service: notify.ios_<your_device_ID>`.
Your device name can be found in the `ios.conf` file in the homeassistant configuration folder: Your device ID can be found in the `ios.conf` file in your configuration folder. The file is compressed JSON. You can view it easier by copying the file contents and pasting them into [JSONLint](http://jsonlint.com).
`{"devices": {"iphone": {"deviceId": "iphone", "pushToken": "", "permissions": ["location"], "battery": {"state": "Unplugged", "level": 100}, "pushSounds": [], "pushId": "", "app": {"buildNumber": 1, "bundleIdentifer": "io.robbie.HomeAssistant"}, "device": {"systemName": "iOS", "name": "iPhone", "systemVersion": "10.2.1", "localizedModel": "iPhone", "type": "iPhone 7", "model": "iPhone", "permanentID": ""}}}}
In this example, the device ID is `robbiet480_7plus`, so the notify service to use is `notify.ios_robbiet480_7plus`:
Configuration variables: ```json
- **name** (*Optional*): Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`. {"devices":{"robbiet480_7plus":{"app":{"bundleIdentifer":"io.robbie.HomeAssistant","versionNumber":1,"buildNumber":53},"pushSounds":[],"permissions":["location"],"deviceId":"robbiet480_7plus","device":{"type":"iPhone 7 Plus","systemName":"iOS","systemVersion":"10.3","permanentID":"AB9F02FE-6AC6-47B8-ADEB-5DD87B489156","localizedModel":"iPhone","name":"Robbie's iPhone 7 Plus","model":"iPhone"},"battery":{"state":"Full","level":100},"pushToken":"SECRET","pushId":"SECRET"}}}
- **message** (*Required*): Your message to show up in the notification
Example Automation:
```yaml
- service: notify.ios.<your_device_name>
data_template:
message: "This is the message"
``` ```
You can find more information in the [Basic Notifications](https://home-assistant.io/docs/ecosystem/ios/notifications/basic/) documentation.