Add migration to migrate 'homewizard_energy' to 'homewizard'#65594
Add migration to migrate 'homewizard_energy' to 'homewizard'#65594balloob merged 1 commit intohome-assistant:devfrom
Conversation
| """Handle a flow initiated by older `homewizard_energy` component.""" | ||
| _LOGGER.debug("config_flow async_step_import") | ||
|
|
||
| self.hass.components.persistent_notification.async_create( |
There was a problem hiding this comment.
Should we make this a persistent notification or a log?
We general log these
There was a problem hiding this comment.
Also fine! Just took over the same behaviour from this migration: #59698
There was a problem hiding this comment.
I think a persistent notification is better, easy to miss a log.
| """Initialize the HomeWizard config flow.""" | ||
| self.config: dict[str, str | int] = {} | ||
|
|
||
| async def async_step_import(self, import_config: dict) -> FlowResult: |
There was a problem hiding this comment.
What triggers this import step? I'm not seeing it?
There was a problem hiding this comment.
The custom integration when it is updated, see https://github.com/DCSBL/ha-homewizard-energy/blob/2067090f20ce74a9f8c133e3dcccd40a79ca524d/custom_components/homewizard_energy/__init__.py
balloob
left a comment
There was a problem hiding this comment.
Nice! I will push it into the next patch release to make migration easier.
|
Awesome! Thanks for the fast merge 🚀 |
MartinHjelmare
left a comment
There was a problem hiding this comment.
Please address the comments in a new PR. Thanks!
|
@MartinHjelmare Addressed your comments in #65718 |
Proposed change
Users that used the custom integration (link) have to migrate the component because the domain is changes from
homewizard_energytohomewizard. They have to reconfigure the integration and match the entity ID's to preserve history and all configurations.This adds the possibility for the custom component to trigger a migration. This migration is based on #59698
Type of change
Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: