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
Add SmartThings Scene platform #21405
Conversation
fda9dce
to
f501667
Compare
This PR will need to be rebased to fix new tests added by recently merged PRs. I'll get that done tonight. |
f501667
to
a74d2ac
Compare
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' " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future I’ll mske the device scope optional too, so someone could only care about scenes.
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:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code does not interact with devices: