mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
Update mysensors to use async_add_executor_job (#41849)
This commit is contained in:
parent
3ee4f43b20
commit
41872341f5
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user