mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 02:07:54 +00:00
Merge pull request #2023 from philipbl/fix_slack
Fix problem with Slack default channel
This commit is contained in:
commit
9729c44d53
@ -51,7 +51,7 @@ class SlackNotificationService(BaseNotificationService):
|
|||||||
"""Send a message to a user."""
|
"""Send a message to a user."""
|
||||||
import slacker
|
import slacker
|
||||||
|
|
||||||
channel = kwargs.get('target', self._default_channel)
|
channel = kwargs.get('target') or self._default_channel
|
||||||
try:
|
try:
|
||||||
self.slack.chat.post_message(channel, message)
|
self.slack.chat.post_message(channel, message)
|
||||||
except slacker.Error:
|
except slacker.Error:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user