Skip to content

Conversation

@henningkerstan
Copy link

Proposed change

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies a diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the EnOcean integration away from using hass.data[...] storage and instead uses ConfigEntry.runtime_data to hold the dongle instance, aligning the integration with current Home Assistant patterns.

Changes:

  • Removed legacy hass.data keys/constants previously used for EnOcean runtime storage.
  • Added a typed EnOceanConfigEntry and EnOceanConfigRuntimeData container for runtime_data.
  • Updated async_setup_entry / async_unload_entry to store and retrieve the dongle via config_entry.runtime_data.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
homeassistant/components/enocean/const.py Removes now-unneeded hass.data storage constants.
homeassistant/components/enocean/config_entry.py Introduces typed config entry runtime data definitions for the integration.
homeassistant/components/enocean/__init__.py Switches setup/unload logic from hass.data to config_entry.runtime_data.
@henningkerstan
Copy link
Author

This is a first (minor) step towards my larger PR #161251

Copy link
Contributor

@epenet epenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new module for this is not useful
Just keep them at the top of __init__.py

@home-assistant
Copy link

home-assistant bot commented Feb 1, 2026

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft February 1, 2026 07:12
@henningkerstan henningkerstan marked this pull request as ready for review February 1, 2026 07:43
@home-assistant home-assistant bot requested a review from epenet February 1, 2026 07:43
Copy link
Contributor

@epenet epenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe you don't even need the class if it has only one property...

@home-assistant home-assistant bot marked this pull request as draft February 1, 2026 07:57
@henningkerstan henningkerstan marked this pull request as ready for review February 1, 2026 08:12
@home-assistant home-assistant bot requested a review from epenet February 1, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment