Fix multiple motion blinds gateways (#46622)

local variable multicast was undefined for a second or more gateway that was setup.
pull/43308/head^2
starkillerOG 2021-02-17 09:25:00 +01:00 committed by GitHub
parent 94131df5e0
commit ddf1f88b65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

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