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

View File

@@ -129,7 +129,7 @@ async def _get_gateway(hass, config, gateway_conf, persistence_file):
) )
else: else:
try: try:
await hass.async_add_job(is_serial_port, device) await hass.async_add_executor_job(is_serial_port, device)
gateway = mysensors.AsyncSerialGateway( gateway = mysensors.AsyncSerialGateway(
device, device,
baud=baud_rate, baud=baud_rate,
@@ -141,7 +141,7 @@ async def _get_gateway(hass, config, gateway_conf, persistence_file):
) )
except vol.Invalid: except vol.Invalid:
try: try:
await hass.async_add_job(is_socket_address, device) await hass.async_add_executor_job(is_socket_address, device)
# valid ip address # valid ip address
gateway = mysensors.AsyncTCPGateway( gateway = mysensors.AsyncTCPGateway(
device, device,