Skip to content

Commit 1980675

Browse files
Fix reauthentication
1 parent 470d3e8 commit 1980675

File tree

1 file changed

+3
-1
lines changed
  • custom_components/xiaomi_cloud_map_extractor/connector

1 file changed

+3
-1
lines changed

custom_components/xiaomi_cloud_map_extractor/connector/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ async def _update(self: Self) -> None:
9292

9393
if not self._is_authenticated():
9494
_LOGGER.debug("Logging in...")
95-
await self._cloud_connector.login_with_credentials(self._username, self._password)
95+
if self._connector_config.username is None or self._connector_config.password is None:
96+
raise FailedLoginException()
97+
await self._cloud_connector.login_with_credentials(self._connector_config.username, self._connector_config.password)
9698
if not self._is_authenticated():
9799
_LOGGER.error("Not authenticated!")
98100
raise FailedLoginException()

0 commit comments

Comments
 (0)