mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 04:35:11 +02:00
Update mysensors to use async_add_executor_job (#41849)
This commit is contained in:
@@ -129,7 +129,7 @@ async def _get_gateway(hass, config, gateway_conf, persistence_file):
|
||||
)
|
||||
else:
|
||||
try:
|
||||
await hass.async_add_job(is_serial_port, device)
|
||||
await hass.async_add_executor_job(is_serial_port, device)
|
||||
gateway = mysensors.AsyncSerialGateway(
|
||||
device,
|
||||
baud=baud_rate,
|
||||
@@ -141,7 +141,7 @@ async def _get_gateway(hass, config, gateway_conf, persistence_file):
|
||||
)
|
||||
except vol.Invalid:
|
||||
try:
|
||||
await hass.async_add_job(is_socket_address, device)
|
||||
await hass.async_add_executor_job(is_socket_address, device)
|
||||
# valid ip address
|
||||
gateway = mysensors.AsyncTCPGateway(
|
||||
device,
|
||||
|
Reference in New Issue
Block a user