mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Don't close HA aiohttp session in Overkiz Config Flow (#64052)
This commit is contained in:
parent
4bdc0c7120
commit
3fcdaa8a5d
@ -38,15 +38,13 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
server = SUPPORTED_SERVERS[user_input[CONF_HUB]]
|
server = SUPPORTED_SERVERS[user_input[CONF_HUB]]
|
||||||
session = async_get_clientsession(self.hass)
|
session = async_get_clientsession(self.hass)
|
||||||
|
|
||||||
async with OverkizClient(
|
client = OverkizClient(
|
||||||
username=username,
|
username=username, password=password, server=server, session=session
|
||||||
password=password,
|
)
|
||||||
server=server,
|
|
||||||
session=session,
|
|
||||||
) as client:
|
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
# Set first gateway as unique id
|
# Set first gateway id as unique id
|
||||||
if gateways := await client.get_gateways():
|
if gateways := await client.get_gateways():
|
||||||
gateway_id = gateways[0].id
|
gateway_id = gateways[0].id
|
||||||
await self.async_set_unique_id(gateway_id)
|
await self.async_set_unique_id(gateway_id)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/overkiz",
|
"documentation": "https://www.home-assistant.io/integrations/overkiz",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"pyoverkiz==1.1.0"
|
"pyoverkiz==1.1.1"
|
||||||
],
|
],
|
||||||
"dhcp": [
|
"dhcp": [
|
||||||
{
|
{
|
||||||
|
@ -1740,7 +1740,7 @@ pyotgw==1.1b1
|
|||||||
pyotp==2.6.0
|
pyotp==2.6.0
|
||||||
|
|
||||||
# homeassistant.components.overkiz
|
# homeassistant.components.overkiz
|
||||||
pyoverkiz==1.1.0
|
pyoverkiz==1.1.1
|
||||||
|
|
||||||
# homeassistant.components.openweathermap
|
# homeassistant.components.openweathermap
|
||||||
pyowm==3.2.0
|
pyowm==3.2.0
|
||||||
|
@ -1097,7 +1097,7 @@ pyotgw==1.1b1
|
|||||||
pyotp==2.6.0
|
pyotp==2.6.0
|
||||||
|
|
||||||
# homeassistant.components.overkiz
|
# homeassistant.components.overkiz
|
||||||
pyoverkiz==1.1.0
|
pyoverkiz==1.1.1
|
||||||
|
|
||||||
# homeassistant.components.openweathermap
|
# homeassistant.components.openweathermap
|
||||||
pyowm==3.2.0
|
pyowm==3.2.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user