core: Hive Integration | No Climate Data " KeyError: 'model'

The problem

Hive switch and climate entities became unavailable - have removed and re-added the integration but no longer provides any climate or switch entities

Screenshot 2023-08-23 at 15 50 38 Screenshot 2023-08-23 at 15 51 06

In the logs I see the errors:

2023-08-23 15:40:54.013 ERROR (MainThread) [homeassistant.components.climate] Error while setting up hive platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 362, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/hive/climate.py", line 64, in async_setup_entry
    entities.append(HiveClimateEntity(hive, dev))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hive/climate.py", line 113, in __init__
    super().__init__(hive_session, hive_device)
  File "/usr/src/homeassistant/homeassistant/components/hive/__init__.py", line 157, in __init__
    model=self.device["deviceData"]["model"],
          ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'model'

and

2023-08-23 15:40:54.026 ERROR (MainThread) [homeassistant.components.switch] Error while setting up hive platform for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 362, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/hive/switch.py", line 43, in async_setup_entry
    entities.append(HiveSwitch(hive, dev, description))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hive/switch.py", line 52, in __init__
    super().__init__(hive, hive_device)
  File "/usr/src/homeassistant/homeassistant/components/hive/__init__.py", line 157, in __init__
    model=self.device["deviceData"]["model"],
          ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'model'

Running in Docker: Home Assistant 2023.8.3 Frontend 20230802.1 - latest

Hive has 2FA enabled, is using the management email account (not a shared account) and has no offline devices at the point of configuring the integration.

I’ve seen similar issues with a different keyerror but these haven’t helped:

https://github.com/home-assistant/core/issues/73007 https://github.com/home-assistant/core/issues/80341

What version of Home Assistant Core has the issue?

core-2023.8.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Hive

Link to integration documentation on our website

https://www.home-assistant.io/integrations/hive/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-08-23 15:40:54.013 ERROR (MainThread) [homeassistant.components.climate] Error while setting up hive platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 362, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/hive/climate.py", line 64, in async_setup_entry
    entities.append(HiveClimateEntity(hive, dev))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hive/climate.py", line 113, in __init__
    super().__init__(hive_session, hive_device)
  File "/usr/src/homeassistant/homeassistant/components/hive/__init__.py", line 157, in __init__
    model=self.device["deviceData"]["model"],
          ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'model'

and

2023-08-23 15:40:54.026 ERROR (MainThread) [homeassistant.components.switch] Error while setting up hive platform for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 362, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/hive/switch.py", line 43, in async_setup_entry
    entities.append(HiveSwitch(hive, dev, description))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hive/switch.py", line 52, in __init__
    super().__init__(hive, hive_device)
  File "/usr/src/homeassistant/homeassistant/components/hive/__init__.py", line 157, in __init__
    model=self.device["deviceData"]["model"],
          ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'model'


### Additional information

_No response_

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Reactions: 3
  • Comments: 25 (6 by maintainers)

Most upvoted comments

I have the same issue. Reloaded but switch and temp entities unavailable. Removed, restarted, readded and still no boost switch or temp. I do get the battery level. Thermostat is SLT3 with firmware 05060212. Hub is NANO2 with firmware 1.0.0-7026-C18. 2FA enabled. All devices online in the Hive app.

I have similar errors to Matty87a

Logger: homeassistant.components.switch Source: components/hive/init.py:157 Integration: Switch (documentation, issues) First occurred: 10:36:12 (1 occurrences) Last logged: 10:36:12

Error while setting up hive platform for switch Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 362, in _async_setup_platform await asyncio.shield(task) File “/usr/src/homeassistant/homeassistant/components/hive/switch.py”, line 43, in async_setup_entry entities.append(HiveSwitch(hive, dev, description)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/src/homeassistant/homeassistant/components/hive/switch.py”, line 52, in init super().init(hive, hive_device) File “/usr/src/homeassistant/homeassistant/components/hive/init.py”, line 157, in init model=self.device[“deviceData”][“model”], ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ KeyError: ‘model’

Logger: homeassistant.components.climate Source: components/hive/init.py:157 Integration: Climate (documentation, issues) First occurred: 10:36:12 (1 occurrences) Last logged: 10:36:12

Error while setting up hive platform for climate Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 362, in _async_setup_platform await asyncio.shield(task) File “/usr/src/homeassistant/homeassistant/components/hive/climate.py”, line 64, in async_setup_entry entities.append(HiveClimateEntity(hive, dev)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/src/homeassistant/homeassistant/components/hive/climate.py”, line 113, in init super().init(hive_session, hive_device) File “/usr/src/homeassistant/homeassistant/components/hive/init.py”, line 157, in init model=self.device[“deviceData”][“model”], ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ KeyError: ‘model’