Skip to content

Commit

Permalink
Add error log to indicate a failure to find the device specified in t…
Browse files Browse the repository at this point in the history
…he configuration.
  • Loading branch information
hbeaufils committed Jan 18, 2025
1 parent e7fbbfd commit bd05bd3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion custom_components/xiaomi_cloud_map_extractor/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,12 @@ def _handle_login(self):

def _handle_device(self):
_LOGGER.debug("Retrieving device info, country: %s", self._country)
country, user_id, device_id, model = self._connector.get_device_details(self._vacuum.token, self._country)
token = self._vacuum.token
country, user_id, device_id, model = self._connector.get_device_details(token, self._country)

if device_id is None:
_LOGGER.error("Failed to find a device matching the given token: %s", token)

if model is not None:
self._country = country
_LOGGER.debug("Retrieved device model: %s", model)
Expand Down

0 comments on commit bd05bd3

Please # to comment.