Closed ejpenney closed 12 months ago
same error after upgrating OMADA software Controller to 5.13.22. the integration was broken.
The response doesn't have a roleType anymore. I get this
{'omadacId': 'XXXXXXX', 'token': 'XXXXXXX'}
I can't find the API documentation so I can't really find why...
I don't see that role_type being used anywhere, so simply remove it seems to fix it. Needs more testing and checking the documentation changes.
Commenting out the lines containing self.role_type
in controller.py allowed the integration to start on my installation.
custom_components/omada/api/controller.py
Line 32: # self.role_type = 0
Line 56: # self.role_type = response["roleType"]
Line 59: # LOGGER.info(f"Login successful. Role type {self.role_type}.")
Upgraded my Omada Software controller to 5.13.22 today and the integration started throwing this error:
I wrapped the relevant line like so:
Everything works now, so it appears self.role_type isn't used? Or the default value of "0" is working in any event.