Skip polling of unavailable Matter nodes (#109917)

This commit is contained in:
Marcel van der Veldt 2024-02-08 09:01:48 +01:00 committed by GitHub
parent d6e617eff8
commit 2d88b77813
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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,