Update uiprotect to 3.1.1 (#120173)
This commit is contained in:
parent
57e615aa36
commit
ea0c93e3db
11 changed files with 123 additions and 87 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue