Prevent update entity becoming unavailable on device disconnect in IronOS (#129840)

* Don't render update entity unavailable when Pinecil device disconnects

* fixes
pull/129906/head
Manu 2024-11-05 18:39:10 +01:00 committed by GitHub
parent 05e76105ad
commit 611a952232
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -92,4 +92,7 @@ class IronOSUpdate(IronOSBaseEntity, UpdateEntity):
@property
def available(self) -> bool:
"""Return if entity is available."""
return super().available and self.firmware_update.last_update_success
return (
self.installed_version is not None
and self.firmware_update.last_update_success
)