Lost Hive connection after update

I’ve just upgraded to Home Assistant OS 8.5 and Core 2022.9.7. When I logged on again the connection to Hive had failed to set up. Below is the log:

Logger: homeassistant.config_entries
Source: components/hive/__init__.py:89
First occurred: 14:46:27 (1 occurrences)
Last logged: 14:46:27

Error setting up entry [email protected] for hive
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 357, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/hive/__init__.py", line 89, in async_setup_entry
    devices = await hive.session.startSession(hive_config)
  File "/usr/local/lib/python3.10/site-packages/apyhiveapi/session.py", line 494, in startSession
    await self.getDevices("No_ID")
  File "/usr/local/lib/python3.10/site-packages/apyhiveapi/session.py", line 417, in getDevices
    await self.hiveRefreshTokens()
  File "/usr/local/lib/python3.10/site-packages/apyhiveapi/session.py", line 304, in hiveRefreshTokens
    result = await self.auth.refresh_token(
  File "/usr/local/lib/python3.10/site-packages/apyhiveapi/api/hive_auth_async.py", line 548, in refresh_token
    result = await self.loop.run_in_executor(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/botocore/client.py", line 391, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.10/site-packages/botocore/client.py", line 691, in _make_api_call
    request_dict = self._convert_to_request_dict(
  File "/usr/local/lib/python3.10/site-packages/botocore/client.py", line 739, in _convert_to_request_dict
    request_dict = self._serializer.serialize_to_request(
  File "/usr/local/lib/python3.10/site-packages/botocore/validate.py", line 360, in serialize_to_request
    raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter AuthParameters, value: ({'REFRESH_TOKEN': 'eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiUlNBLU9BRVAifQ.UJq_fv2Pth0MxIuXOlr13WxJSWeagJcabwqTe5Klj3mxGQ9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P5Cc51S_N02aADgmQB9wiUjCoE_oy6p-r9sfGULniO_w6DaS6MGIL1Un2uge6Ea2r_4gQ4SSw7Dt16Hr8aMOyz5qMUzl4IYrYViBMPHJ5mqKBUKn5xrycHGPgHYIBpY8Gx1uZjOwO0LA-bfzGnWByTnK_kySsoCby_6TAN-HfuzvdadyFt_0QNtm8TkaJb-y-F99wUbWgmeiyTpKdaLKG_FzvW30L1URWegltGiy3JitDcghs0ZOJN-JodACKfku0v046tyA2bkv98Cijz-3LNOmLmchr-Z1J2tBHWJ5bAjEhuQeh25KLQbSdYMkWpplpyaaQlJGs0X-svmFhXNSrZnztAwoFxVw9yzspdl1FqgWtrq5CGBfWpBRtxmsoXNTNGo6c9-c63J-w1ecOr2YLDZBJNn_wysXcP0oFETeTVCK3YFOv7VUyV1UnHfSE39bsCh9ygZmZcumR3QPWRHN-zCXT6MLNn5tzX3UVXAw0unrSY1TqM_I8IpupxAgtP3TK2oxdhfrioeFL6nlsddPfjWWBw6H4O8B6k5iCY2HaFhXTGhBDTM_5_uc4VJt7IEQtFCc.UOK2uwA9wwaG4sCHEu1VYg'},), type: <class 'tuple'>, valid types: <class 'dict'>

Have you got 2FA enabled in the Hive app ? If not you need to enable it in the newer versions of HA (2022.6.6+ I think). You’ll need to enable 2FA, delete the integration and restart and then add the integration again

Thanks. Reinstalling it got it working again.