Skip to content

Use ConfigEntry.runtime_data for integration runtime state#214

Merged
MTrab merged 1 commit intomainfrom
refactor/use-config-entry-runtime-data
Mar 2, 2026
Merged

Use ConfigEntry.runtime_data for integration runtime state#214
MTrab merged 1 commit intomainfrom
refactor/use-config-entry-runtime-data

Conversation

@MTrab
Copy link
Copy Markdown
Owner

@MTrab MTrab commented Mar 2, 2026

Summary

  • migrate integration runtime storage from hass.data[DOMAIN][entry_id] to typed ConfigEntry.runtime_data
  • add WebastoRuntimeData and WebastoConfigEntry typing in __init__.py
  • update setup/unload/reload lifecycle to use entry.runtime_data
  • update all platforms and diagnostics to read coordinator from entry.runtime_data.coordinator
  • remove now-obsolete coordinator/devices/update-listener constants
  • update affected unit tests for the new runtime-data model

Why

  • aligns integration with current Home Assistant guidance for storing runtime data
  • improves type safety and avoids ad-hoc global storage in hass.data

Test strategy

  • ruff check custom_components/webastoconnect tests
  • python3 -m pytest -q tests

Configuration changes

  • none

@MTrab MTrab added the enhancement New feature or request label Mar 2, 2026
@MTrab MTrab merged commit a4d0383 into main Mar 2, 2026
4 checks passed
@MTrab MTrab deleted the refactor/use-config-entry-runtime-data branch March 2, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant