Skip to content

Start the 5.0 integration when it is installed next to 4.x - #520

Merged
RobHofmann merged 1 commit into
masterfrom
feat/start-5x-migration
Sep 23, 2026
Merged

RobHofmann merged 1 commit into
masterfrom
feat/start-5x-migration

Conversation

@RobHofmann

@RobHofmann RobHofmann commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Version 5.0 (branch 5.0-dev, domain gree_custom) moves a 4.x setup over when it starts: #519. But Home Assistant only sets up an integration that has a config entry or a YAML key, and after an update through HACS gree_custom has neither. HACS also leaves custom_components/gree in place, so this version still runs after the update.

This PR makes async_setup start gree_custom when it is installed. When it is not installed, nothing happens. Users who update to this release before they update to 5.0 then move over without doing anything. Users who skip it can still start the move by opening the setup flow of 5.0.

Testing

On the dev instance, with 5.0 installed next to this change:

  • UI entry: gree_custom started, and the devices, entities and device row moved.
  • gree: YAML block: gree_custom started, and the YAML was converted.
  • With the original 4.0.6 code, gree_custom did not start. This confirms that the hook is needed.

With gree_custom not installed, async_get_integration raises IntegrationNotFound and the hook returns. Ruff with default rules reports nothing.

Notes

  • Draft, because it only makes sense together with the 5.0 migration PR. It is safe to release before 5.0: it does nothing until gree_custom is installed.
  • No version bump. That goes through the release workflow.

Version 5.0 uses the domain gree_custom and moves the 4.x devices over
when it starts. Home Assistant only sets up an integration that has a
config entry or a YAML key, and after an update through HACS gree_custom
has neither. HACS also leaves custom_components/gree in place, so this
version still runs after the update.

async_setup now starts gree_custom when it is installed. Nothing happens
when it is not. This makes the move to 5.0 work without user action for
everyone who updates to this release first.
@RobHofmann
RobHofmann marked this pull request as ready for review September 23, 2026 19:23
@RobHofmann
RobHofmann merged commit 31d87aa into master Sep 23, 2026
@RobHofmann
RobHofmann deleted the feat/start-5x-migration branch September 23, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant