added documentation for "target" (#4369)

* added documentation for "target"

and example

* added trailing comma
This commit is contained in:
Devon Peet 2018-01-11 15:13:52 -05:00 committed by Franck Nijhof
parent 5da39427c5
commit 3ba1647266

View File

@ -36,7 +36,7 @@ Configuration variables:
- **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`. - **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`.
- **api_key** (*Required*): The Slack API token to use for sending Slack messages. - **api_key** (*Required*): The Slack API token to use for sending Slack messages.
- **default_channel** (*Required*): The default channel to post to if no channel is explicitly specified when sending the notification message. - **default_channel** (*Required*): The default channel to post to if no channel is explicitly specified when sending the notification message. A channel can be specified adding a target attribute to the json at the same level as "message"
- **username** (*Optional*): Setting username will allow Home Assistant to post to Slack using the username specified. By default not setting this will post to Slack using the user account or botname that you generated the api_key as. - **username** (*Optional*): Setting username will allow Home Assistant to post to Slack using the username specified. By default not setting this will post to Slack using the user account or botname that you generated the api_key as.
- **icon** (*Optional*): Use one of the Slack emojis as an Icon for the supplied username. Slack uses the standard emoji sets used [here](http://www.webpagefx.com/tools/emoji-cheat-sheet/). - **icon** (*Optional*): Use one of the Slack emojis as an Icon for the supplied username. Slack uses the standard emoji sets used [here](http://www.webpagefx.com/tools/emoji-cheat-sheet/).
@ -60,6 +60,7 @@ Example for posting file from URL:
{ {
"message":"Message that will be added as a comment to the file.", "message":"Message that will be added as a comment to the file.",
"title":"Title of the file.", "title":"Title of the file.",
"target": ["#channelname"],
"data":{ "data":{
"file":{ "file":{
"url":"http://[url to file, photo, security camera etc]", "url":"http://[url to file, photo, security camera etc]",