Hive integration: Failed to set up

Hi

My Hive integration has been working fine for as long as Ive been using HA (well over a year). Recently I noticed that it stopped working - this may have coincided with Hive forcing me to set up 2FA but I cant be sure

Try as I might i cant get it working again. I can login to Hive fine, get prompted for the 2FA code fine, but still it Fails to set up.

I have tried installing a completely clean HA instance on a different machine, and the problem persists - logs below

If anyone can help to solve this, I’ll be very grateful!
Thanks

HA Test installation
Logger: homeassistant.config_entries
Source: config_entries.py:604
First occurred: 17:55:19 (2 occurrences)
Last logged: 17:55:32

Error setting up entry [redacted] for hive
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/hive/init.py”, line 87, in async_setup_entry
devices = await hive.session.startSession(hive_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py”, line 509, in startSession
return await self.createDevices()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py”, line 539, in createDevices
eval(“self.” + code)
File “”, line 1, in
File “/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py”, line 131, in addList
device = self.helper.getDeviceData(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/apyhiveapi/helper/hive_helper.py”, line 98, in getDeviceData
device = self.session.data.devices[product[“props”][“trvs”][0]]
~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

HA Production installation
Logger: homeassistant.config_entries
Source: config_entries.py:604
First occurred: 19:43:35 (3 occurrences)
Last logged: 19:45:02

Error setting up entry [redacted] for hive
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/hive/init.py”, line 89, in async_setup_entry
devices = await hive.session.startSession(hive_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py”, line 509, in startSession
return await self.createDevices()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py”, line 539, in createDevices
eval(“self.” + code)
File “”, line 1, in
File “/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py”, line 131, in addList
device = self.helper.getDeviceData(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/apyhiveapi/helper/hive_helper.py”, line 98, in getDeviceData
device = self.session.data.devices[product[“props”][“trvs”][0]]
~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

I’m also having this issue!

I just had to delete my Hive integration and reconfigure. Has setup fine, hope it stays that way…

After restarting the integration failed again.

However, the fix by DavidBSteele here worked for me!

I had 5 or 6 Home Assistant entries in as trusted devices. Deleted them all and setup again.

Sadly the issues have returned. Cannot get it to work for anything more than a few seconds. :frowning: