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

Fail when user tries run custom config flow #24657

Merged
merged 1 commit into from Jun 20, 2019
Merged

Conversation

balloob
Copy link
Member

@balloob balloob commented Jun 20, 2019

Description:

Fail with a useful message when a user tries to start a config flow from a custom integration. This will help Life360 users understand why the new config flow is not working.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@balloob balloob added this to the 0.95.0 milestone Jun 20, 2019
@balloob balloob requested a review from a team as a code owner June 20, 2019 17:51
@andrewsayre andrewsayre changed the title Warn when user tries run custom config flow Fail when user tries run custom config flow Jun 20, 2019
@andrewsayre
Copy link
Member

This does effectively stop someone from running a modified version of a built-in integration that is config flow only. I also updated the title, as it's not a warning, it's a failure. :)

@balloob
Copy link
Member Author

balloob commented Jun 20, 2019

The longterm fix will be to allow custom integrations to add config flows. It means we need to scan all custom integrations at startup etc.

@balloob balloob merged commit 319ac23 into dev Jun 20, 2019
@delete-merged-branch delete-merged-branch bot deleted the warn-custom-config-flow branch June 20, 2019 20:22
@balloob balloob mentioned this pull request Jun 26, 2019
@elupus
Copy link
Contributor

elupus commented Jun 30, 2019

Well previously it was enough to extend the FLOWS variable in asymc_setup, which I admit was really a hack, but why not just require a call from async_setup in a custom component to register the flow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants