Fix FLUX_LED error when no color is set #13527
Merged
balloob merged 4 commits intohome-assistant:devfrom Mar 30, 2018
Merged
Conversation
As is, an error gets thrown when turn_on is called without an HS value. By adding an if statement, we only try to set RGB if an HS value is applied.
Handle turn_on situation when no color is set
houndci-bot
reviewed
Mar 29, 2018
|
|
||
| hs_color = kwargs.get(ATTR_HS_COLOR) | ||
| rgb = color_util.color_hs_to_RGB(*hs_color) | ||
|
|
pvizeli
requested changes
Mar 29, 2018
| hs_color = kwargs.get(ATTR_HS_COLOR) | ||
| rgb = color_util.color_hs_to_RGB(*hs_color) | ||
|
|
||
| if hs_color is not None: |
Contributor
Author
|
Thanks! Made the changes. |
balloob
approved these changes
Mar 30, 2018
Member
|
Thanks! 🐬 |
balloob
pushed a commit
that referenced
this pull request
Mar 30, 2018
* Handle turn_on situation when no color is set As is, an error gets thrown when turn_on is called without an HS value. By adding an if statement, we only try to set RGB if an HS value is applied. * Fix Whitespace Issues * Made Requested Changes
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
As is, an error gets thrown when turn_on is called without an HS value. By adding an if statement, we only try to set RGB if an HS value is applied.
Related issue (if applicable): fixes #13519
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for
configuration.yaml(if applicable):Checklist:
tox. Your PR cannot be merged unless tests pass