|
| None | _async_send_local_file_message (self, str path, list[str] targets, str message, str|None title, str|None thread_ts) |
| |
| None | _async_send_remote_file_message (self, str url, list[str] targets, str message, str|None title, str|None thread_ts, *str|None username=None, str|None password=None) |
| |
| None | _async_send_text_only_message (self, list[str] targets, str message, str|None title, str|None thread_ts, *str|None username=None, str|None icon=None, Any|None blocks=None) |
| |
Define the Slack notification logic.
Definition at line 133 of file notify.py.
◆ __init__()
| None homeassistant.components.slack.notify.SlackNotificationService.__init__ |
( |
|
self, |
|
|
HomeAssistant |
hass, |
|
|
WebClient |
client, |
|
|
dict[str, str] |
config |
|
) |
| |
◆ _async_send_local_file_message()
| None homeassistant.components.slack.notify.SlackNotificationService._async_send_local_file_message |
( |
|
self, |
|
|
str |
path, |
|
|
list[str] |
targets, |
|
|
str |
message, |
|
|
str | None |
title, |
|
|
str | None |
thread_ts |
|
) |
| |
|
private |
Upload a local file (with message) to Slack.
Definition at line 147 of file notify.py.
◆ _async_send_remote_file_message()
| None homeassistant.components.slack.notify.SlackNotificationService._async_send_remote_file_message |
( |
|
self, |
|
|
str |
url, |
|
|
list[str] |
targets, |
|
|
str |
message, |
|
|
str | None |
title, |
|
|
str | None |
thread_ts, |
|
|
*str | None |
username = None, |
|
|
str | None |
password = None |
|
) |
| |
|
private |
Upload a remote file (with message) to Slack.
Note that we bypass the python-slackclient WebClient and use aiohttp directly,
as the former would require us to download the entire remote file into memory
first before uploading it to Slack.
Definition at line 175 of file notify.py.
◆ _async_send_text_only_message()
| None homeassistant.components.slack.notify.SlackNotificationService._async_send_text_only_message |
( |
|
self, |
|
|
list[str] |
targets, |
|
|
str |
message, |
|
|
str | None |
title, |
|
|
str | None |
thread_ts, |
|
|
*str | None |
username = None, |
|
|
str | None |
icon = None, |
|
|
Any | None |
blocks = None |
|
) |
| |
|
private |
Send a text-only message.
Definition at line 230 of file notify.py.
◆ async_send_message()
| None homeassistant.components.slack.notify.SlackNotificationService.async_send_message |
( |
|
self, |
|
|
str |
message, |
|
|
**Any |
kwargs |
|
) |
| |
Send a message to Slack.
Definition at line 275 of file notify.py.
◆ _client
| homeassistant.components.slack.notify.SlackNotificationService._client |
|
private |
◆ _config
| homeassistant.components.slack.notify.SlackNotificationService._config |
|
private |
◆ _hass
| homeassistant.components.slack.notify.SlackNotificationService._hass |
|
private |
The documentation for this class was generated from the following file:
- core/homeassistant/components/slack/notify.py