core: Hive Error after 2022.6.6 Update - Failed to set up
The problem
After upgrading to 2022.6 the Hive integration has failed and after release 2022.6.6 the issue is still present.
2FA is enabled on my owner account and I do get prompted for the 2FA code and this is accepted.
What version of Home Assistant Core has the issue?
2022.6.6
What was the last working version of Home Assistant Core?
2022.5.5
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Hive
Link to integration documentation on our website
https://www.home-assistant.io/integrations/hive/
Diagnostics information
Logger: pyhiveapi.helper.logger Source: /usr/local/lib/python3.9/site-packages/pyhiveapi/api/hive_async_api.py:83 First occurred: 10:04:32 AM (1 occurrences) Last logged: 10:04:32 AM
Hive token as expired when calling https://beekeeper.hivehome.com/1.0/cognito/refresh-token - HTTP status is - 401
This error originated from a custom integration.
Logger: homeassistant.config_entries Source: custom_components/hive/init.py:134 Integration: Hive First occurred: 10:04:32 AM (1 occurrences) Last logged: 10:04:32 AM
Error setting up entry EMAIL@ADDRESS.COM for hive Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 339, in async_setup result = await component.async_setup_entry(hass, self) File “/config/custom_components/hive/init.py”, line 134, in async_setup_entry devices = await hive.session.startSession(hive_config) File “/usr/local/lib/python3.9/site-packages/pyhiveapi/session.py”, line 216, in startSession await self.getDevices(“No_ID”) File “/usr/local/lib/python3.9/site-packages/pyhiveapi/session.py”, line 149, in getDevices await self.hiveRefreshTokens() File “/usr/local/lib/python3.9/site-packages/pyhiveapi/session.py”, line 118, in hiveRefreshTokens updated = await self.api.refreshTokens() File “/usr/local/lib/python3.9/site-packages/pyhiveapi/api/hive_async_api.py”, line 107, in refreshTokens await self.request(“post”, url, data=jsc) File “/usr/local/lib/python3.9/site-packages/pyhiveapi/api/hive_async_api.py”, line 83, in request await self.logger.LOGGER.error( TypeError: object NoneType can’t be used in ‘await’ expression
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: pyhiveapi.helper.logger
Source: /usr/local/lib/python3.9/site-packages/pyhiveapi/api/hive_async_api.py:83
First occurred: 10:04:32 AM (1 occurrences)
Last logged: 10:04:32 AM
Hive token as expired when calling https://beekeeper.hivehome.com/1.0/cognito/refresh-token - HTTP status is - 401
----------------------------------------------------------------------------------------------------------------------------------
This error originated from a custom integration.
Logger: homeassistant.config_entries
Source: custom_components/hive/init.py:134
Integration: Hive
First occurred: 10:04:32 AM (1 occurrences)
Last logged: 10:04:32 AM
Error setting up entry [EMAIL@ADDRESS.COM](mailto:EMAIL@ADDRESS.COM) for hive
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 339, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/hive/init.py", line 134, in async_setup_entry
devices = await hive.session.startSession(hive_config)
File "/usr/local/lib/python3.9/site-packages/pyhiveapi/session.py", line 216, in startSession
await self.getDevices("No_ID")
File "/usr/local/lib/python3.9/site-packages/pyhiveapi/session.py", line 149, in getDevices
await self.hiveRefreshTokens()
File "/usr/local/lib/python3.9/site-packages/pyhiveapi/session.py", line 118, in hiveRefreshTokens
updated = await self.api.refreshTokens()
File "/usr/local/lib/python3.9/site-packages/pyhiveapi/api/hive_async_api.py", line 107, in refreshTokens
await self.request("post", url, data=jsc)
File "/usr/local/lib/python3.9/site-packages/pyhiveapi/api/hive_async_api.py", line 83, in request
await self.logger.LOGGER.error(
TypeError: object NoneType can't be used in 'await' expression
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 34 (7 by maintainers)
It’s not a bug Hive no longer support refreshing tokens without 2fa turned on. You will notice on the latest version of the hive app if you turn 2fa off you cannot use it.