Skip to content
Snippets Groups Projects
Unverified Commit 29d06e8f authored by shred86's avatar shred86 Committed by GitHub
Browse files

Update legacy job calls in abode (#33607)

parent e8a0abd1
No related branches found
No related tags found
No related merge requests found
...@@ -292,7 +292,7 @@ class AbodeEntity(Entity): ...@@ -292,7 +292,7 @@ class AbodeEntity(Entity):
async def async_added_to_hass(self): async def async_added_to_hass(self):
"""Subscribe to Abode connection status updates.""" """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._data.abode.events.add_connection_status_callback,
self.unique_id, self.unique_id,
self._update_connection_status, self._update_connection_status,
...@@ -302,7 +302,7 @@ class AbodeEntity(Entity): ...@@ -302,7 +302,7 @@ class AbodeEntity(Entity):
async def async_will_remove_from_hass(self): async def async_will_remove_from_hass(self):
"""Unsubscribe from Abode connection status updates.""" """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, self._data.abode.events.remove_connection_status_callback, self.unique_id,
) )
...@@ -323,7 +323,7 @@ class AbodeDevice(AbodeEntity): ...@@ -323,7 +323,7 @@ class AbodeDevice(AbodeEntity):
async def async_added_to_hass(self): async def async_added_to_hass(self):
"""Subscribe to device events.""" """Subscribe to device events."""
await super().async_added_to_hass() 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._data.abode.events.add_device_callback,
self._device.device_id, self._device.device_id,
self._update_callback, self._update_callback,
...@@ -332,7 +332,7 @@ class AbodeDevice(AbodeEntity): ...@@ -332,7 +332,7 @@ class AbodeDevice(AbodeEntity):
async def async_will_remove_from_hass(self): async def async_will_remove_from_hass(self):
"""Unsubscribe from device events.""" """Unsubscribe from device events."""
await super().async_will_remove_from_hass() 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 self._data.abode.events.remove_all_device_callbacks, self._device.device_id
) )
......
...@@ -41,7 +41,7 @@ class AbodeCamera(AbodeDevice, Camera): ...@@ -41,7 +41,7 @@ class AbodeCamera(AbodeDevice, Camera):
"""Subscribe Abode events.""" """Subscribe Abode events."""
await super().async_added_to_hass() 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._data.abode.events.add_timeline_callback,
self._event, self._event,
self._capture_callback, self._capture_callback,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment