From ab039b4643c29496908c87a1a4a0dfe9fdedec01 Mon Sep 17 00:00:00 2001 From: Robert Lippmann Date: Thu, 1 Feb 2024 01:53:45 -0500 Subject: [PATCH] fix coordinator exception handling --- custom_components/adtpulse/coordinator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/custom_components/adtpulse/coordinator.py b/custom_components/adtpulse/coordinator.py index e159c05..5b1ec2f 100644 --- a/custom_components/adtpulse/coordinator.py +++ b/custom_components/adtpulse/coordinator.py @@ -113,5 +113,9 @@ async def _async_update_data(self) -> None: if update_exception: self.async_set_update_error(update_exception) + # async_set_update_error will only notify listeners on first error + if not self.last_update_success: + self.async_update_listeners() else: + self.last_exception = None self.async_set_updated_data(None)