Skip to content

fix: DeviceEntry.config_entry_id removed in HA 2025.12 - #164

Merged
moehrem merged 3 commits into
mainfrom
vibe/fix-device-entry-config-entry-id
Oct 12, 2026
Merged

moehrem merged 3 commits into
mainfrom
vibe/fix-device-entry-config-entry-id

Conversation

@moehrem

@moehrem moehrem commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fixed AttributeError: 'DeviceEntry' object has no attribute 'config_entry_id' occurring when executing device actions like diveracontrol.post_vehicle_status on Home Assistant 2025.12+
  • Home Assistant 2025.12 removed DeviceEntry.config_entry_id in favor of primary_config_entry / config_entries
  • Added compatibility helper get_device_config_entry_ids() in utils.py that works with both old and new HA API
  • Replaced all direct DeviceEntry.config_entry_id accesses in utils.py, device_action.py, and __init__.py (migration cleanup)
  • get_ucr_data_from_device() now iterates over all linked config entries and prefers the one belonging to the DiveraControl domain

Verification

  • python -m py_compile passes for all modified files
  • Helper logic validated standalone against old API (config_entry_id), new API (primary_config_entry + config_entries), empty devices, and existing test mocks
  • Full pytest suite could not run in the sandbox (pinned homeassistant==2026.9.4 not available on the sandbox PyPI mirror)

@moehrem moehrem self-assigned this Oct 12, 2026
@moehrem moehrem added the bug Something isn't working label Oct 12, 2026
@moehrem
moehrem marked this pull request as ready for review October 12, 2026 13:48
@moehrem
moehrem merged commit defc496 into main Oct 12, 2026
7 checks passed
@moehrem
moehrem deleted the vibe/fix-device-entry-config-entry-id branch October 12, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants