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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning to custom integrations without version #45919

Merged
merged 13 commits into from
Feb 4, 2021

Conversation

ludeeus
Copy link
Member

@ludeeus ludeeus commented Feb 3, 2021

Breaking change

Custom integrations now require a version key in their manifest file, this also means that all custom integrations now require a manifest file.

If you are using a legacy custom integration like custom_components/awesome.py this now needs to move to custom_components/awesome/__init__.py so you can add custom_components/awesome/manifest.json to it.

For more information about integration, manifests have a look here https://developers.home-assistant.io/docs/creating_integration_manifest

For now, this will create a warning on startup. But this will eventually be blocked from loading if it's missing a version in the manifest.

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)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml

Additional information

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

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.
  • 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:

@project-bot project-bot bot added this to Needs review in Dev Feb 3, 2021
@ludeeus ludeeus marked this pull request as ready for review February 3, 2021 21:22
homeassistant/loader.py Outdated Show resolved Hide resolved
@ludeeus
Copy link
Member Author

ludeeus commented Feb 3, 2021

It's not working for legacy integrations, marking as draft until that is solved.

@ludeeus ludeeus marked this pull request as draft February 3, 2021 23:05
@ludeeus ludeeus marked this pull request as ready for review February 4, 2021 01:14
homeassistant/loader.py Outdated Show resolved Hide resolved
homeassistant/loader.py Outdated Show resolved Hide resolved
Dev automation moved this from Needs review to Reviewer approved Feb 4, 2021
ludeeus and others added 2 commits February 4, 2021 09:37
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
@ludeeus ludeeus merged commit 06e6005 into dev Feb 4, 2021
Dev automation moved this from Reviewer approved to Done Feb 4, 2021
@ludeeus ludeeus deleted the custom-integration-version-warning branch February 4, 2021 08:59
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants