Update device_tracker to use async_add_executor_job (#41515)
This commit is contained in:
1 parent
4d9ff13384
commit
5b8ecc26a4
2 files changed
+6
-6
No files matched your search
@@ -60,7 +60,7 @@ class DeviceTrackerPlatform:
|
||||
hass, {DOMAIN: self.config}
|
||||
)
|
||||
elif hasattr(self.platform, "get_scanner"):
|
||||
scanner = await hass.async_add_job(
|
||||
scanner = await hass.async_add_executor_job(
|
||||
self.platform.get_scanner, hass, {DOMAIN: self.config}
|
||||
)
|
||||
elif hasattr(self.platform, "async_setup_scanner"):
|
||||
@@ -68,7 +68,7 @@ class DeviceTrackerPlatform:
|
||||
hass, self.config, tracker.async_see, discovery_info
|
||||
)
|
||||
elif hasattr(self.platform, "setup_scanner"):
|
||||
setup = await hass.async_add_job(
|
||||
setup = await hass.async_add_executor_job(
|
||||
self.platform.setup_scanner,
|
||||
hass,
|
||||
self.config,
|
||||
|
||||
Reference in new issue
Block a user