Replace executor with async_add_job (#7658)
* Remove executor * Lint * Lint * Fix tests
This commit is contained in:
1 parent
9e9705d6b2
commit
f43db3c615
46 files changed
+196
-248
No files matched your search
@@ -103,8 +103,8 @@ class GenericCamera(Camera):
|
||||
_LOGGER.error("Error getting camera image: %s", error)
|
||||
return self._last_image
|
||||
|
||||
self._last_image = yield from self.hass.loop.run_in_executor(
|
||||
None, fetch)
|
||||
self._last_image = yield from self.hass.async_add_job(
|
||||
fetch)
|
||||
# async
|
||||
else:
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user