Hive Integration ... Failed to set up

Hi
I have been using Hive in HA for some time. I added a new TRV and restarted Hive, put the correct username and password in, did not get a 2FA request or an SMS text with the code which I was expecting. HA simply reported the message that the system had failed to set up.
Is there a user configuration that I need to update?
I notice that the error log contains (No_ID) for the device
I really now don’t know what to do, can someone help.
Thank you
Mark

  • Installation methodHome Assistant OS
  • Core2026.2.2
  • Supervisor2026.02.2
  • Operating System17.1
  • Frontend20260128.6
Logger: homeassistant.config_entries
Source: config_entries.py:762
First occurred: 5:34:11 PM (3 occurrences)
Last logged: 5:54:23 PM

Error setting up entry [email protected] for hive
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/apyhiveapi/api/hive_auth_async.py", line 569, in refresh_token
    result = await self.loop.run_in_executor(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.13/site-packages/botocore/client.py", line 569, in _api_call
    return self._make_api_call(operation_name, kwargs)
           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/botocore/client.py", line 1023, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.NotAuthorizedException: An error occurred (NotAuthorizedException) when calling the InitiateAuth operation: Invalid Refresh Token.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/apyhiveapi/session.py", line 314, in hiveRefreshTokens
    result = await self.auth.refresh_token(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        self.tokens.tokenData["refreshToken"]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/apyhiveapi/api/hive_auth_async.py", line 579, in refresh_token
    raise HiveFailedToRefreshTokens from err
apyhiveapi.helper.hive_exceptions.HiveFailedToRefreshTokens

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/apyhiveapi/session.py", line 291, in deviceLogin
    result = await self.auth.device_login()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/apyhiveapi/api/hive_auth_async.py", line 441, in device_login
    raise HiveInvalidDeviceAuthentication
apyhiveapi.helper.hive_exceptions.HiveInvalidDeviceAuthentication

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 762, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hive/__init__.py", line 42, in async_setup_entry
    devices = await hive.session.startSession(hive_config)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/apyhiveapi/session.py", line 520, in startSession
    await self.getDevices("No_ID")
  File "/usr/local/lib/python3.13/site-packages/apyhiveapi/session.py", line 437, in getDevices
    await self.hiveRefreshTokens()
  File "/usr/local/lib/python3.13/site-packages/apyhiveapi/session.py", line 321, in hiveRefreshTokens
    await self.deviceLogin()
  File "/usr/local/lib/python3.13/site-packages/apyhiveapi/session.py", line 293, in deviceLogin
    raise HiveInvalidDeviceAuthentication
apyhiveapi.helper.hive_exceptions.HiveInvalidDeviceAuthentication

this has happened to me also today. :frowning: came looking for a solution also

I thought that this issue may have been a me problem, as I setup HA on Saturday as I am migrating over from SmartThings. Hive is the only integration that doesn’t work for me up to now.

My error message is the same as shown by the OP.

There is some comfort in knowing that you are not on your own.
I have logged in using a variety of browsers on a varity of hardware and not once has a 2FA request been made or an SMS text appear.
Therefore I feel that the problem may lie with Hive and not HA or us.
If the integration writers are reading this, would it be possible to detect if 2FA is not needed, and still proceed if not? I realise that this should not be an issue, but it would give slightly more friendly approach. Mark

I notice that the same issue has been raised with the Hive Custom Component on GitHub …. but they are more vocal.
This does point to the fact that it is a Hive Problem

… this is all to the good to getting an answer.

Hi,
I’ve got the same issue today when I setup a new instance of HA. I called Hive support and the answer is they temporarily disabled 2FA without any reason given. Also, they didn’t provide any timeframe on it. I would suggest all of us having the issue give them a shout to push them. :slight_smile:

       ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^

Same issue here. I’ve just moved house and had Hive installed in the new house. Hive has been set up today and is recognising all my devices (just thermostats and Hive Active lights). During Home Assistant setup, I’m asked for my user name and password which are accepted, but at no point during about 6 attempts to complete the setup have I been prompted for a 2FA code, and no code has come to my phone.

I’ve tried uninstalling and reinstalling the Hive app and deleting Home Assistant from the very long list of trusted devices in the app - most of which seem to be the same device connecting repeatedly via a Chrome/Mozilla browser.

Since I don’t think Hive advertises itself as “Home Assistant compatible”, I’ve no idea what else I can do.

Has anybody had any joy with this yet?

  File "/usr/local/lib/python3.13/site-packages/botocore/client.py", line 1023, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.NotAuthorizedException: An error occurred (NotAuthorizedException) when calling the InitiateAuth operation: Invalid Refresh Token.

Install Hive Custom Component from HACS, this will fix the problem.