Fix broken 2fa authentication in synology_dsm (#42775)

This commit is contained in:
Michael 2020-11-03 00:20:02 +01:00 committed by GitHub
parent 391a5447d3
commit 3e0fd99616
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -271,10 +271,9 @@ class SynoApi:
self._entry.data[CONF_SSL],
self._entry.data[CONF_VERIFY_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)