From 41872341f57f1ff8bedca172d46e9d86dc9b4528 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 15 Oct 2020 09:22:50 -0500 Subject: [PATCH] Update mysensors to use async_add_executor_job (#41849) --- homeassistant/components/mysensors/gateway.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/mysensors/gateway.py b/homeassistant/components/mysensors/gateway.py index 3bb6326f78d..f9450b798ac 100644 --- a/homeassistant/components/mysensors/gateway.py +++ b/homeassistant/components/mysensors/gateway.py @@ -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,