dahlb / ha_blueair

Home Assistant Integration for Blueair Class Filters
MIT License
25 stars 6 forks source link

Add support for aws region used in china #6

Open briansun92 opened 1 year ago

briansun92 commented 1 year ago

I can't settting up ha_blueair with an error. And it operate in Home Assistant 2022.10.3

it's error log

Logger: homeassistant.config_entries Source: custom_components/ha_blueair/init.py:56 Integration: Blueair (documentation, issues) First occurred: 00:40:38 (1 occurrences) Last logged: 00:40:38

Error setting up entry briansun92@hotmail.com for ha_blueair Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/ha_blueair/init.py", line 56, in async_setupentry , aws_devices = await get_aws_devices(username=username, password=password, client_session=client_session) File "/usr/local/lib/python3.10/site-packages/blueair_api/util_bootstrap.py", line 51, in get_aws_devices api_devices = await api.devices() File "/usr/local/lib/python3.10/site-packages/blueair_api/http_aws_blueair.py", line 157, in devices 'Authorization': f"Bearer {await self.get_access_token()}", File "/usr/local/lib/python3.10/site-packages/blueair_api/http_aws_blueair.py", line 151, in get_access_token await self.refresh_access_token() File "/usr/local/lib/python3.10/site-packages/blueair_api/http_aws_blueair.py", line 136, in refresh_access_token await self.refresh_jwt() File "/usr/local/lib/python3.10/site-packages/blueair_api/http_aws_blueair.py", line 120, in refresh_jwt await self.refresh_session() File "/usr/local/lib/python3.10/site-packages/blueair_api/http_aws_blueair.py", line 110, in refresh_session await self._post_request_with_logging_and_errors_raised( File "/usr/local/lib/python3.10/site-packages/blueair_api/http_aws_blueair.py", line 20, in request_with_active_session_wrapper raise e File "/usr/local/lib/python3.10/site-packages/blueair_api/http_aws_blueair.py", line 16, in request_with_active_session_wrapper return await func(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/blueair_api/http_aws_blueair.py", line 54, in request_with_errors_wrapper raise AuthError(response.text()) blueair_api.errors.AuthError: <coroutine object ClientResponse.text at 0x7f669f0eb0>

dahlb commented 1 year ago

looks like you have used the wrong password

briansun92 commented 1 year ago

I'm sure I'm using the correct password. And I can sign in app with the same password. But I'm in china and I'm not sure if they used different api.