From 28f850f4c2054b9380144aff9dbf6eb87c910f71 Mon Sep 17 00:00:00 2001 From: PimDoos <17709721+PimDoos@users.noreply.github.com> Date: Tue, 27 Jan 2026 21:56:47 +0100 Subject: [PATCH 1/2] Properly close API on all paths in discovery --- src/sessypy/devices.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sessypy/devices.py b/src/sessypy/devices.py index 40f0827..711d75e 100644 --- a/src/sessypy/devices.py +++ b/src/sessypy/devices.py @@ -153,9 +153,11 @@ async def get_sessy_device(host: str, username: str, password: str) -> SessyDevi _LOGGER.debug(f"System info for {host}: {system_info}") except SessyConnectionException as e: _LOGGER.error(f"Failed to connect to {host}: {e}") + await api.close() raise SessyConnectionException from e except SessyNotSupportedException as e: _LOGGER.error(f"Device at {host} is not supported: {e}") + await api.close() raise SessyNotSupportedException from e From bf176675d974ff318921743bb97fbe820c78a8ed Mon Sep 17 00:00:00 2001 From: PimDoos <17709721+PimDoos@users.noreply.github.com> Date: Tue, 27 Jan 2026 21:57:22 +0100 Subject: [PATCH 2/2] Bump version to 0.2.6 --- pyproject.toml | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 59592eb..421f09b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "sessypy" -version = "0.2.5" +version = "0.2.6" authors = [ { name="PimDoos" }, ] diff --git a/setup.cfg b/setup.cfg index a8f04af..8d62fe1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = sessypy -version = 0.2.5 +version = 0.2.6 author = PimDoos url = https://github.com/PimDoos/sessypy long_description = file: README.md