From 1c25468b21d4d78b57c1acf8c2fcf556ee2c6107 Mon Sep 17 00:00:00 2001
From: shred86 <32663154+shred86@users.noreply.github.com>
Date: Sat, 4 Apr 2020 15:19:59 -0700
Subject: [PATCH] Add await to coroutines in Abode (#33664)

---
 homeassistant/components/abode/__init__.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/homeassistant/components/abode/__init__.py b/homeassistant/components/abode/__init__.py
index 9f4c1dc5fd3..84d1d34bd78 100644
--- a/homeassistant/components/abode/__init__.py
+++ b/homeassistant/components/abode/__init__.py
@@ -292,7 +292,7 @@ class AbodeEntity(Entity):
 
     async def async_added_to_hass(self):
         """Subscribe to Abode connection status updates."""
-        self.hass.async_add_executor_job(
+        await self.hass.async_add_executor_job(
             self._data.abode.events.add_connection_status_callback,
             self.unique_id,
             self._update_connection_status,
@@ -302,7 +302,7 @@ class AbodeEntity(Entity):
 
     async def async_will_remove_from_hass(self):
         """Unsubscribe from Abode connection status updates."""
-        self.hass.async_add_executor_job(
+        await self.hass.async_add_executor_job(
             self._data.abode.events.remove_connection_status_callback, self.unique_id,
         )
 
@@ -323,7 +323,7 @@ class AbodeDevice(AbodeEntity):
     async def async_added_to_hass(self):
         """Subscribe to device events."""
         await super().async_added_to_hass()
-        self.hass.async_add_executor_job(
+        await self.hass.async_add_executor_job(
             self._data.abode.events.add_device_callback,
             self._device.device_id,
             self._update_callback,
@@ -332,7 +332,7 @@ class AbodeDevice(AbodeEntity):
     async def async_will_remove_from_hass(self):
         """Unsubscribe from device events."""
         await super().async_will_remove_from_hass()
-        self.hass.async_add_executor_job(
+        await self.hass.async_add_executor_job(
             self._data.abode.events.remove_all_device_callbacks, self._device.device_id
         )
 
-- 
GitLab