From 480b8165d73d529e037d9bdbb803c838e0a7b23c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 8 Oct 2020 16:58:33 -0500 Subject: [PATCH] Update notify to use async_add_executor_job (#41516) --- homeassistant/components/notify/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/notify/__init__.py b/homeassistant/components/notify/__init__.py index 9a4ec681aab..51d5e348d5e 100644 --- a/homeassistant/components/notify/__init__.py +++ b/homeassistant/components/notify/__init__.py @@ -114,7 +114,7 @@ class BaseNotificationService: kwargs can contain ATTR_TITLE to specify a title. """ - await self.hass.async_add_job(partial(self.send_message, message, **kwargs)) # type: ignore + await self.hass.async_add_executor_job(partial(self.send_message, message, **kwargs)) # type: ignore async def _async_notify_message_service(self, service: ServiceCall) -> None: """Handle sending notification message service calls.""" @@ -238,7 +238,7 @@ async def async_setup(hass, config): hass, p_config, discovery_info ) elif hasattr(platform, "get_service"): - notify_service = await hass.async_add_job( + notify_service = await hass.async_add_executor_job( platform.get_service, hass, p_config, discovery_info ) else: