Prevent ZHA coordinator from showing unavailable (#61068)

pull/61073/head
David F. Mulcahey 2021-12-05 18:24:20 -05:00 committed by GitHub
parent ac263acb1c
commit 5e90e178aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -341,6 +341,9 @@ class ZHADevice(LogMixin):
)
async def _check_available(self, *_):
# don't flip the availability state of the coordinator
if self.is_coordinator:
return
if self.last_seen is None:
self.update_available(False)
return