mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 05:46:52 +00:00
Update Slack docs to include on-the-fly username/icon changes (#14281)
This commit is contained in:
parent
fffe014db0
commit
9fffd278f1
@ -69,12 +69,21 @@ icon:
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
||||
<div class='note'>
|
||||
|
||||
Note that in order to modify your Slack bot's username and icon, you must ensure your Slack app has the `chat:write.customize` OAuth scope. See [the Slack API documentation](https://api.slack.com/methods/chat.postMessage#authorship) for more information.
|
||||
|
||||
</div>
|
||||
|
||||
### Slack Service Data
|
||||
|
||||
The following attributes can be placed inside the `data` key of the service call for extended functionality:
|
||||
|
||||
| Attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `username` | yes | The username of the Slack bot.
|
||||
| `icon` | yes | The icon of the Slack bot.
|
||||
| `file` | yes | A file to include with the message; see below.
|
||||
| `file` | yes | A file to include with the message; see below.
|
||||
| `blocks` | yes | Array of [Slack blocks](https://api.slack.com/messaging/composing/layouts). *NOTE*: if using `blocks`, they are shown **in place of** the `message` (note that the `message` is required nonetheless).
|
||||
| `blocks_template` | yes | The same as `blocks`, but able to support [templates](https://www.home-assistant.io/docs/configuration/templating).
|
||||
|
Loading…
x
Reference in New Issue
Block a user