Update legacy job calls in abode (#33607)

This commit is contained in:
shred86 authored and GitHub committed 2020-04-04 11:30:00 -05:00
1 parent e8a0abd107
commit 29d06e8faf
2 files changed
+5 -5

No files matched your search

+4 -4
View File
@@ -292,7 +292,7 @@ class AbodeEntity(Entity):
async def async_added_to_hass(self):
"""Subscribe to Abode connection status updates."""
self.hass.async_add_job(
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_job(
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_job(
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_job(
self.hass.async_add_executor_job(
self._data.abode.events.remove_all_device_callbacks, self._device.device_id
)
+1 -1
View File
@@ -41,7 +41,7 @@ class AbodeCamera(AbodeDevice, Camera):
"""Subscribe Abode events."""
await super().async_added_to_hass()
self.hass.async_add_job(
self.hass.async_add_executor_job(
self._data.abode.events.add_timeline_callback,
self._event,
self._capture_callback,