mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Check Surveillance Station permissions during setup of Synology DSM integration (#78884)
This commit is contained in:
parent
c4eafb98fa
commit
2c08dc509f
@ -91,6 +91,16 @@ class SynoApi:
|
|||||||
self._with_surveillance_station = bool(
|
self._with_surveillance_station = bool(
|
||||||
self.dsm.apis.get(SynoSurveillanceStation.CAMERA_API_KEY)
|
self.dsm.apis.get(SynoSurveillanceStation.CAMERA_API_KEY)
|
||||||
)
|
)
|
||||||
|
if self._with_surveillance_station:
|
||||||
|
try:
|
||||||
|
self.dsm.surveillance_station.update()
|
||||||
|
except SYNOLOGY_CONNECTION_EXCEPTIONS:
|
||||||
|
self._with_surveillance_station = False
|
||||||
|
self.dsm.reset(SynoSurveillanceStation.API_KEY)
|
||||||
|
LOGGER.info(
|
||||||
|
"Surveillance Station found, but disabled due to missing user permissions"
|
||||||
|
)
|
||||||
|
|
||||||
LOGGER.debug(
|
LOGGER.debug(
|
||||||
"State of Surveillance_station during setup of '%s': %s",
|
"State of Surveillance_station during setup of '%s': %s",
|
||||||
self._entry.unique_id,
|
self._entry.unique_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user