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

Add SmartThings Scene platform #21405

Merged
merged 3 commits into from Feb 26, 2019

Conversation

Projects
None yet
3 participants
@andrewsayre
Copy link
Contributor

andrewsayre commented Feb 24, 2019

Description:

Adds the SmartThings Scene platform which allows execution of scenes defined within SmartThings. A scene entity is created for each scene as defined in SmartThings

Pull request in home-assistant.io with documentation: home-assistant/home-assistant.io#8718

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.

If user exposed functionality or configuration variables are added/changed:

If the code does not interact with devices:

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

@wafflebot wafflebot bot added the in progress label Feb 24, 2019

@andrewsayre andrewsayre referenced this pull request Feb 24, 2019

Merged

Add SmartThings Scene platform docs #8718

2 of 2 tasks complete

@andrewsayre andrewsayre force-pushed the andrewsayre:feature-smartthings-scene branch from fda9dce to f501667 Feb 24, 2019

@andrewsayre

This comment has been minimized.

Copy link
Contributor Author

andrewsayre commented Feb 25, 2019

This PR will need to be rebased to fix new tests added by recently merged PRs. I'll get that done tonight.

andrewsayre added some commits Feb 24, 2019

@andrewsayre andrewsayre force-pushed the andrewsayre:feature-smartthings-scene branch from f501667 to a74d2ac Feb 25, 2019

@andrewsayre andrewsayre requested a review from MartinHjelmare Feb 25, 2019

@andrewsayre

This comment has been minimized.

Copy link
Contributor Author

andrewsayre commented Feb 25, 2019

This PR will need to be rebased to fix new tests added by recently merged PRs. I'll get that done tonight.

Ready for review!

return await api.scenes(location_id=entry.data[CONF_LOCATION_ID])
except ClientResponseError as ex:
if ex.status == 403:
_LOGGER.exception("Unable to load scenes for config entry '%s' "

This comment has been minimized.

@balloob

balloob Feb 26, 2019

Member

Any reason you don't want to act on an invalid token? Should we notify the user via a persistent_notification ? Should we trigger a new config flow to request the new scope?

This comment has been minimized.

@andrewsayre

andrewsayre Feb 26, 2019

Author Contributor

It’s a valid token, just missing an OAuth scope. I didn’t think it needed to be an error for the whole integration or something we wanted to pester the user about. This could be a way to “turn off scenes” in the integration.

This comment has been minimized.

@andrewsayre

andrewsayre Feb 26, 2019

Author Contributor

In the future I’ll mske the device scope optional too, so someone could only care about scenes.

@balloob balloob merged commit 3b9db88 into home-assistant:dev Feb 26, 2019

3 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
Hound No violations found. Woof!
cla-bot Everyone involved has signed the CLA
coverage/coveralls Coverage increased (+0.003%) to 92.742%
Details

@wafflebot wafflebot bot removed the in progress label Feb 26, 2019

@andrewsayre andrewsayre deleted the andrewsayre:feature-smartthings-scene branch Feb 27, 2019

@balloob balloob referenced this pull request Mar 6, 2019

Merged

0.89.0 #21712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.