You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated the integration to the latest version available
I have checked if the problem is already reported
The problem
When there is more than one home assigned to user, map could not be retrieved.
Token extractor works fine for me, so I was sure that token and the IP are correct.
I debugged the code a little bit, and here's what I discovered:
xiaomi_cloud_connector is always checking only first home in each country when looking for devices (see line 140). If the device that we are looking for is not assigned to our first home then devices are empty, so eventually in camera.py method update we end up with else branch in line 279 (self._device is not None == false)
This part can be easily fixed by using the same code from Token Extractor (https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/blob/master/token_extractor.py - starting from line 275) which fixes part of the problem - if token is correct, then we get our device, no matter to which home it is assigned to, however there is still some bug, because later, map name could not be retrieved - it is set to retry after 10 retries
What version of an integration has described problem?
v2.2.1
What was the last working version of an integration?
Checklist
The problem
When there is more than one home assigned to user, map could not be retrieved.
Token extractor works fine for me, so I was sure that token and the IP are correct.
I debugged the code a little bit, and here's what I discovered:
xiaomi_cloud_connector is always checking only first home in each country when looking for devices (see line 140). If the device that we are looking for is not assigned to our first home then devices are empty, so eventually in camera.py method update we end up with else branch in line 279 (self._device is not None == false)
This part can be easily fixed by using the same code from Token Extractor (https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/blob/master/token_extractor.py - starting from line 275) which fixes part of the problem - if token is correct, then we get our device, no matter to which home it is assigned to, however there is still some bug, because later, map name could not be retrieved - it is set to retry after 10 retries
What version of an integration has described problem?
v2.2.1
What was the last working version of an integration?
No response
What vacuum model do you have problems with?
roborock.vacuum.s5
What version of Home Assistant do you use?
core-2024.6.3
What type of installation are you running?
Home Assistant OS
Camera's configuration
Errors shown in the HA logs (if applicable)
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: