mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Suez_water: close session after config flow (#132714)
This commit is contained in:
parent
b1c17334f6
commit
f210b74790
@ -37,6 +37,7 @@ async def validate_input(data: dict[str, Any]) -> None:
|
||||
data[CONF_PASSWORD],
|
||||
counter_id,
|
||||
)
|
||||
try:
|
||||
if not await client.check_credentials():
|
||||
raise InvalidAuth
|
||||
except PySuezError as ex:
|
||||
@ -47,6 +48,8 @@ async def validate_input(data: dict[str, Any]) -> None:
|
||||
data[CONF_COUNTER_ID] = await client.find_counter()
|
||||
except PySuezError as ex:
|
||||
raise CounterNotFound from ex
|
||||
finally:
|
||||
await client.close_session()
|
||||
|
||||
|
||||
class SuezWaterConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
|
Loading…
x
Reference in New Issue
Block a user