Update mysensors to use async_add_executor_job (#41849)

This commit is contained in:
J. Nick Koston 2020-10-15 09:22:50 -05:00 committed by GitHub
parent 3ee4f43b20
commit 41872341f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,