Fix multiple motion blinds gateways (#46622)

local variable multicast was undefined for a second or more gateway that was setup.
This commit is contained in:
starkillerOG
2021-02-17 09:25:00 +01:00
committed by GitHub
parent 94131df5e0
commit ddf1f88b65

View File

@@ -54,6 +54,7 @@ async def async_setup_entry(
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, stop_motion_multicast)
# Connect to motion gateway
multicast = hass.data[DOMAIN][KEY_MULTICAST_LISTENER]
connect_gateway_class = ConnectMotionGateway(hass, multicast)
if not await connect_gateway_class.async_connect_gateway(host, key):
raise ConfigEntryNotReady