Skip to content

Commit 5bad9d1

Browse files
committed
Only request node info when outdated
1 parent 2451efb commit 5bad9d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ async def load(self) -> bool:
726726
return False
727727

728728
# Get node info
729-
if await self.node_info_update() is None:
729+
if self.skip_update(self._node_info, 30) and await self.node_info_update() is None:
730730
_LOGGER.info(
731731
"Failed to load Circle node %s because it is not responding to information request",
732732
self._node_info.mac
@@ -796,7 +796,7 @@ async def initialize(self) -> bool:
796796
)
797797
self._initialized = False
798798
return False
799-
if await self.node_info_update() is None:
799+
if self.skip_update(self._node_info, 30) and await self.node_info_update() is None:
800800
_LOGGER.debug(
801801
"Failed to retrieve node info for %s",
802802
self.mac

0 commit comments

Comments
 (0)