Fix broken 2fa authentication in synology_dsm (#42775)

This commit is contained in:
Michael 2020-11-03 00:20:02 +01:00 committed by Paulus Schoutsen
parent d967ecc8c6
commit 43486917bf

View File

@ -258,10 +258,9 @@ class SynoApi:
self._entry.data[CONF_PASSWORD],
self._entry.data[CONF_SSL],
timeout=self._entry.options.get(CONF_TIMEOUT),
device_token=self._entry.data.get("device_token"),
)
await self._hass.async_add_executor_job(
self.dsm.login, self._entry.data.get("device_token")
)
await self._hass.async_add_executor_job(self.dsm.login)
self._with_surveillance_station = bool(
self.dsm.apis.get(SynoSurveillanceStation.CAMERA_API_KEY)