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

pull/38005/head
Jesse Newland 2020-07-20 00:55:50 -05:00 committed by GitHub
parent 890562e3ae
commit 92d72f26c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

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