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

Use config flow instead of configurator for configuration #48

Closed
alandtse opened this issue Nov 30, 2018 · 9 comments · Fixed by #371
Closed

Use config flow instead of configurator for configuration #48

alandtse opened this issue Nov 30, 2018 · 9 comments · Fixed by #371
Assignees
Labels
enhancement New feature or request

Comments

@alandtse
Copy link
Owner

The use of the configurator is very hackish right now. It appears there is a push for components to move to config flow which appears in the integrations panel.

I haven't found the definitive dev guide on config flow yet, but it's mentioned in the integration score guide.

Here's one component that uses it.

If anyone sees the right document or thread, please post it here.

@alandtse alandtse added the enhancement New feature or request label Nov 30, 2018
@alandtse
Copy link
Owner Author

Ok, they really changed the dev guide. Here's the entry.

@keatontaylor
Copy link
Collaborator

This should be the priority going forward, last remaining item before we can move this component into review for being officially included.

@alandtse
Copy link
Owner Author

Actually, this may have to happen after the initial submit to HA. Config flow requires editing homeassistant/config_entries.py (a later release may expose it).

I wonder if we should keep the component separate from the alexa built in or if we should try to integrate with it.

@alandtse alandtse moved this from To do to Deferred in Alexa Media Player HA submission Mar 20, 2019
@ronmichel
Copy link

Config flow for custom components is possible now (see home-assistant/core#24946).

@alandtse
Copy link
Owner Author

@ronmichel thanks. I've been waiting for this.

@alandtse
Copy link
Owner Author

I've done some testing; the big issue is we can't pass image urls to config_flow so there's no way to show a captcha. I may just implement config_flow just to enter credentials and rely on configurator to handle the rest of the login (captcha, 2FA, OTP).

@keatontaylor
Copy link
Collaborator

I've thought about this for a while, solution for now might be to just give them the captcha link and let them copy and paste it into another browser tap.

Alternatively, we can see about seeing if we can convince one of the config-flow maintainers to add the ability to show images.

@alandtse
Copy link
Owner Author

alandtse commented Sep 4, 2019

Nevermind, I figured out how to use config flow with placeholders which will replace {} in the strings.json file. This may be doable after all.

@alandtse
Copy link
Owner Author

For those who are brave and want to help me test; I have a version that appears to be working in my dev environment. It requires the alexapy version currently being merged. Everything is working for me except for properly unloading everything when you remove the integration. Still working through some of those issues. Also #317 is still a problem.

@alandtse alandtse mentioned this issue Sep 19, 2019
@alandtse alandtse moved this from Deferred to Done in Alexa Media Player HA submission Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants