Fix notify.slack service calls using data_template (#37980)

This commit is contained in:
Jesse Newland 2020-07-20 00:55:50 -05:00 committed by Franck Nijhof
parent b003d9675c
commit 34751fcd86
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -224,7 +224,10 @@ class SlackNotificationService(BaseNotificationService):
async def async_send_message(self, message, **kwargs):
"""Send a message to Slack."""
data = kwargs.get(ATTR_DATA, {})
data = kwargs.get(ATTR_DATA)
if data is None:
data = {}
try:
DATA_SCHEMA(data)