mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 07:06:30 +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_UPDATE_AVAILABLE: self.sys_os.need_update,
|
||||||
ATTR_BOARD: self.sys_os.board,
|
ATTR_BOARD: self.sys_os.board,
|
||||||
ATTR_BOOT: self.sys_dbus.rauc.boot_slot,
|
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
|
@api_process
|
||||||
|
@ -127,6 +127,12 @@ class DataDisk(CoreSysAttributes):
|
|||||||
device_object_path="",
|
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
|
@property
|
||||||
def available_disks(self) -> list[Disk]:
|
def available_disks(self) -> list[Disk]:
|
||||||
"""Return a list of possible new disk locations.
|
"""Return a list of possible new disk locations.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user