mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Don't close aiohttp session in Overkiz config flow (#68913)
This commit is contained in:
parent
aa6f551b33
commit
6a0a77f986
@ -49,9 +49,10 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
server = SUPPORTED_SERVERS[user_input[CONF_HUB]]
|
server = SUPPORTED_SERVERS[user_input[CONF_HUB]]
|
||||||
session = async_create_clientsession(self.hass)
|
session = async_create_clientsession(self.hass)
|
||||||
|
|
||||||
async with OverkizClient(
|
client = OverkizClient(
|
||||||
username=username, password=password, server=server, session=session
|
username=username, password=password, server=server, session=session
|
||||||
) as client:
|
)
|
||||||
|
|
||||||
await client.login(register_event_listener=False)
|
await client.login(register_event_listener=False)
|
||||||
|
|
||||||
# Set first gateway id as unique id
|
# Set first gateway id as unique id
|
||||||
@ -139,8 +140,6 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
self, discovery_info: zeroconf.ZeroconfServiceInfo
|
self, discovery_info: zeroconf.ZeroconfServiceInfo
|
||||||
) -> FlowResult:
|
) -> FlowResult:
|
||||||
"""Handle ZeroConf discovery."""
|
"""Handle ZeroConf discovery."""
|
||||||
|
|
||||||
# abort if we already have exactly this bridge id/host
|
|
||||||
properties = discovery_info.properties
|
properties = discovery_info.properties
|
||||||
gateway_id = properties["gateway_pin"]
|
gateway_id = properties["gateway_pin"]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user