mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 20:55:10 +02:00
Suez_water: close session after config flow (#132714)
This commit is contained in:
@@ -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):
|
||||
|
Reference in New Issue
Block a user