Skip polling of unavailable Matter nodes (#109917)

pull/110078/head
Marcel van der Veldt 2024-02-08 09:01:48 +01:00 committed by Franck Nijhof
parent 19349e1779
commit a9b3c2e2b5
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
1 changed files with 3 additions and 0 deletions

View File

@ -129,6 +129,9 @@ class MatterEntity(Entity):
async def async_update(self) -> None:
"""Call when the entity needs to be updated."""
if not self._endpoint.node.available:
# skip poll when the node is not (yet) available
return
# manually poll/refresh the primary value
await self.matter_client.refresh_attribute(
self._endpoint.node.node_id,