-
Notifications
You must be signed in to change notification settings - Fork 18
Description
After upgrading the Hive integration to versions 2025.11.0 – 2025.11.2, the integration fails to set up with a KeyError: 'parent'.
The error occurs during async_setup_entry when the code assumes the presence of devices["parent"], which is not always returned by the Hive API.
Downgrading to 2025.10.1 resolves the issue immediately.
Steps to reproduce the behaviour:
1. Install or upgrade Hive integration via HACS to version 2025.11.x
2. Restart Home Assistant
3. Home Assistant tries to set up the Hive config entry
4. Integration setup fails with error in logs
The Hive integration should set up successfully even if the API response does not include a parent key, or it should safely handle missing keys without crashing.
Logger: homeassistant.config_entries
Source: config_entries.py:762
Error setting up entry for hive
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 "/config/custom_components/hive/init.py", line 52, in async_setup_entry
identifiers={(DOMAIN, devices["parent"][0]["device_id"])},
KeyError: 'parent'
Desktop / Environment
• Home Assistant OS
• Home Assistant version: latest (at time of issue)
• Hive integration: via HACS
• Working version: 2025.10.1
• Broken versions: 2025.11.0, 2025.11.1, 2025.11.2
Additional context
• The integration worked correctly before upgrading.
• Downgrading to 2025.10.1 immediately restores functionality.
• Likely regression caused by assuming devices["parent"] is always present in the API response.
• A guard or fallback should be added when accessing parent.