mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 15:16:33 +00:00
Ignore non-existing data disk (#4221)
This commit is contained in:
parent
de1f3555b1
commit
852771fbcf
@ -63,7 +63,7 @@ class APIOS(CoreSysAttributes):
|
||||
ATTR_UPDATE_AVAILABLE: self.sys_os.need_update,
|
||||
ATTR_BOARD: self.sys_os.board,
|
||||
ATTR_BOOT: self.sys_dbus.rauc.boot_slot,
|
||||
ATTR_DATA_DISK: self.sys_os.datadisk.disk_used.id,
|
||||
ATTR_DATA_DISK: self.sys_os.datadisk.disk_used_id,
|
||||
}
|
||||
|
||||
@api_process
|
||||
|
@ -127,6 +127,12 @@ class DataDisk(CoreSysAttributes):
|
||||
device_object_path="",
|
||||
)
|
||||
|
||||
@property
|
||||
def disk_used_id(self) -> str | None:
|
||||
"""Return current Disk id for data."""
|
||||
disk_used = self.disk_used
|
||||
return disk_used.id if disk_used else None
|
||||
|
||||
@property
|
||||
def available_disks(self) -> list[Disk]:
|
||||
"""Return a list of possible new disk locations.
|
||||
|
Loading…
x
Reference in New Issue
Block a user