Skip to content

Commit 26ab43e

Browse files
committed
Improve retry exception handling
1 parent 06428c0 commit 26ab43e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom_components/sessy/coordinator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
UpdateFailed,
1717
)
1818
from sessypy.devices import SessyBattery, SessyCTMeter, SessyDevice, SessyMeter, SessyP1Meter
19-
from sessypy.util import SessyConnectionException, SessyLoginException, SessyNotSupportedException
19+
from sessypy.util import SessyException, SessyLoginException
2020

2121
from .const import COORDINATOR_RETRIES, COORDINATOR_RETRY_DELAY, DEFAULT_SCAN_INTERVAL, DEFAULT_SCAN_INTERVAL_POWER, ENTITY_ERROR_THRESHOLD, SCAN_INTERVAL_OTA_CHECK, SCAN_INTERVAL_SCHEDULE
2222
from .models import SessyConfigEntry
@@ -158,7 +158,7 @@ async def _async_update_data(self):
158158
# Raising ConfigEntryAuthFailed will cancel future updates
159159
# and start a config flow with SOURCE_REAUTH (async_step_reauth)
160160
raise ConfigEntryAuthFailed from err
161-
except SessyConnectionException as err:
161+
except SessyException as err:
162162
await asyncio.sleep(COORDINATOR_RETRY_DELAY)
163163
continue
164164

0 commit comments

Comments
 (0)