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

Update SmartThings config flow to be entirely UI based #34163

Merged
merged 4 commits into from
Apr 14, 2020

Conversation

andrewsayre
Copy link
Member

@andrewsayre andrewsayre commented Apr 13, 2020

Breaking change

This change removes the need (and ability) to use the SmartThings Classic mobile application to install the Home Assistant SmartApp. Going forward, the SmartThings integration setup is completed entirely through the web. This only changes how the integration is setup and not any functionality once setup.

Proposed change

The SmartThings integration relies on the user using the SmartThings Classic app to complete the installation of the integration. The ST Classic App is on a path to retirement and this change removes that dependency. Instead, the user is prompted to authorize and install the integration into their SmartThings account through a web-based UI (external 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)
  • 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][dev-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:

  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.

  • No score or internal

  • 🥈 Silver

  • 🥇 Gold

  • 🏆 Platinum

@andrewsayre
Copy link
Member Author

CC @erodewald @bparnold3 @dbradmit

Copy link
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

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

Looks great! Just a few last comments.

@balloob balloob merged commit 075030f into dev Apr 14, 2020
@balloob balloob deleted the smartthings_web_support branch April 14, 2020 22:26

result = await flow.async_step_user({"access_token": token})
result = await flow.async_step_pat()
Copy link
Member

Choose a reason for hiding this comment

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

This way of starting the flow in tests is legacy now. Now we always want to use the core interfaces, hass.config_entries.flow.async_init to start a flow and hass.config_entries.flow.async_configure to continue a flow. Doing that makes the tests more robust.

@lock lock bot locked and limited conversation to collaborators Apr 19, 2020
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.

4 participants