mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix slack targets (#3826)
This commit is contained in:
parent
d302dbec2d
commit
40094cecae
@ -68,7 +68,10 @@ class SlackNotificationService(BaseNotificationService):
|
||||
"""Send a message to a user."""
|
||||
import slacker
|
||||
|
||||
targets = kwargs.get(ATTR_TARGET, [self._default_channel])
|
||||
if kwargs.get(ATTR_TARGET) is None:
|
||||
targets = [self._default_channel]
|
||||
else:
|
||||
targets = kwargs.get(ATTR_TARGET)
|
||||
|
||||
data = kwargs.get('data')
|
||||
attachments = data.get('attachments') if data else None
|
||||
|
Loading…
x
Reference in New Issue
Block a user