Update uiprotect to 3.1.1 (#120173)

This commit is contained in:
J. Nick Koston 2024-06-22 18:11:48 -05:00 committed by GitHub
parent 57e615aa36
commit ea0c93e3db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 123 additions and 87 deletions

View file

@ -691,6 +691,7 @@ class ProtectDiskBinarySensor(ProtectNVREntity, BinarySensorEntity):
super()._async_update_device_from_protect(device)
slot = self._disk.slot
self._attr_available = False
available = self.data.last_update_success
# should not be possible since it would require user to
# _downgrade_ to make ustorage disppear
@ -698,7 +699,7 @@ class ProtectDiskBinarySensor(ProtectNVREntity, BinarySensorEntity):
for disk in self.device.system_info.ustorage.disks:
if disk.slot == slot:
self._disk = disk
self._attr_available = True
self._attr_available = available
break
self._attr_is_on = not self._disk.is_healthy