mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fix remove of device when surveillance station is not used in Synology DSM (#92957)
This commit is contained in:
parent
45e7283584
commit
e883fef8ab
@ -147,8 +147,10 @@ async def async_remove_config_entry_device(
|
|||||||
api = data.api
|
api = data.api
|
||||||
serial = api.information.serial
|
serial = api.information.serial
|
||||||
storage = api.storage
|
storage = api.storage
|
||||||
# get_all_cameras does not do I/O
|
all_cameras: list[SynoCamera] = []
|
||||||
all_cameras: list[SynoCamera] = api.surveillance_station.get_all_cameras()
|
if api.surveillance_station is not None:
|
||||||
|
# get_all_cameras does not do I/O
|
||||||
|
all_cameras = api.surveillance_station.get_all_cameras()
|
||||||
device_ids = chain(
|
device_ids = chain(
|
||||||
(camera.id for camera in all_cameras),
|
(camera.id for camera in all_cameras),
|
||||||
storage.volumes_ids,
|
storage.volumes_ids,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user