Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Xiaomi Miio YAML import #78995

Merged
merged 8 commits into from
Oct 21, 2022

Conversation

starkillerOG
Copy link
Contributor

@starkillerOG starkillerOG commented Sep 23, 2022

Breaking change

YAML import for the Xiaomi Miio integration is now removed, config entries have already been imported since HomeAssistant 2021.3.

Proposed change

Remove the really old (HA 2021.3) YAML import for Xiaomi Miio.
Remove the xiaomi miio gateway migration of the unique ID (also since 2021.3 already present), all schould have been migrated by now.
Ensure config_entries are only reloaded when the entry has actually changed.
Add logging in case of a unexpected error during config flow.

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

Checklist

  • 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
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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 link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@homeassistant
Copy link
Contributor

This pull request needs to be manually signed off by @home-assistant/core before it can get merged.

@homeassistant
Copy link
Contributor

Hey there @rytilahti, @syssi, @bieniu, mind taking a look at this pull request as it has been labeled with an integration (xiaomi_miio) you are listed as a code owner for? Thanks!

@starkillerOG starkillerOG changed the title Deprecate YAML import Deprecate Xiaomi Miio YAML import Sep 23, 2022
@rytilahti
Copy link
Member

rytilahti commented Sep 23, 2022

I think not all platforms are converted to use the config flow (e.g., remote #73427), that should be done before we can deprecate the YAML configuration, I think.

@starkillerOG
Copy link
Contributor Author

@rytilahti the YAML config for ir remotes will continue to work, this is only conserning the import of YAML to config flow.
I do agree that the ir remote schould be converted to config flow, but the commands option in the YAML is hard to implement in config flow.
https://www.home-assistant.io/integrations/xiaomi_miio/#commands

Can we just remove the option to spicify these commands?
User can still use remote.send_command , but just can't spicify the IR codes beforehand in YAML, but schould just create scripts for each 'standard' command that call remote.send_command with the IR code pre-specified.

Copy link
Member

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

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

@starkillerOG ah, I see. This looks good to me then! Should the name be changed to "Remove" instead of "Deprecate", as that is what this PR does, right?

Regarding the remote, broadlink integration supports remotes but it is indeed a bit more complicated..

@starkillerOG starkillerOG changed the title Deprecate Xiaomi Miio YAML import Remove Xiaomi Miio YAML import Sep 28, 2022
@starkillerOG
Copy link
Contributor Author

starkillerOG commented Sep 28, 2022

@rytilahti all checks pass, can you approve/merge?
I changed the tile to remove instead of deprecate.

@starkillerOG
Copy link
Contributor Author

@bdraco could you review this and get this fix into 2022.10 beta?

@starkillerOG
Copy link
Contributor Author

@bdraco any more feedback?

Copy link
Member

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

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

Thanks @starkillerOG, let's merge it!

@rytilahti rytilahti merged commit a208049 into home-assistant:dev Oct 21, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Xiaomii Miio configuration for Roborock S7 not working anymore
6 participants