From 92d72f26c78f93a8a39971fe4bb7c7ff6673e338 Mon Sep 17 00:00:00 2001 From: Jesse Newland Date: Mon, 20 Jul 2020 00:55:50 -0500 Subject: [PATCH] Fix notify.slack service calls using data_template (#37980) --- homeassistant/components/slack/notify.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/slack/notify.py b/homeassistant/components/slack/notify.py index aec7de1bd88..b7f3d81feb0 100644 --- a/homeassistant/components/slack/notify.py +++ b/homeassistant/components/slack/notify.py @@ -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)