francispoisson / hilo

Hilo integration for Home Assistant
The Unlicense
26 stars 8 forks source link

API call return error 400 #42

Closed descha000 closed 3 years ago

descha000 commented 3 years ago

Salut, since last version (installed via hacs) I get a setup error when the API call return error 400 when trying to get the access token. Here's the call stack.

Logger: homeassistant.setup Source: custom_components/hilo/hilo_api.py:71 Integration: hilo (documentation, issues) First occurred: November 3, 2021, 10:40:27 PM (1 occurrences) Last logged: November 3, 2021, 10:40:27 PM

Error during setup of component hilo Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 254, in _async_setup_component result = await task File "/config/custom_components/hilo/init.py", line 68, in async_setup return await _async_process_config(hass, config) File "/config/custom_components/hilo/init.py", line 90, in _async_process_config await hilo.async_update_all_devices() File "/config/custom_components/hilo/hilo_api.py", line 213, in async_update_all_devices await self.get_devices() File "/config/custom_components/hilo/hilo_api.py", line 193, in get_devices url = f"{await self.location_url}/Devices" File "/config/custom_components/hilo/hilo_api.py", line 57, in location_url self._location_id = await self.get_location_id() File "/config/custom_components/hilo/hilo_api.py", line 159, in get_location_id req = await self._request(url) File "/config/custom_components/hilo/hilo_api.py", line 111, in _request await self.refresh_token() File "/config/custom_components/hilo/hilo_api.py", line 150, in _refresh_token self._access_token = await self.get_access_token() File "/config/custom_components/hilo/hilo_api.py", line 137, in get_access_token req = await self.async_call(url, method="post", headers=headers, data=body) File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call return await try_again(f"{url} returned {resp.status}") File "/config/custom_components/hilo/hilo_api.py", line 73, in try_again return await self.async_call( File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call return await try_again(f"{url} returned {resp.status}") File "/config/custom_components/hilo/hilo_api.py", line 73, in try_again return await self.async_call( File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call return await try_again(f"{url} returned {resp.status}") File "/config/custom_components/hilo/hilo_api.py", line 73, in try_again return await self.async_call( File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call return await try_again(f"{url} returned {resp.status}") File "/config/custom_components/hilo/hilo_api.py", line 71, in try_again raise HomeAssistantError("Retry limit reached") homeassistant.exceptions.HomeAssistantError: Retry limit reached

Mazotis commented 3 years ago

See #36

descha000 commented 3 years ago

Crap. My bad. Sorry guys.