expose cycleSpeed for color changing lights#53
Open
Conversation
add COLOR_WHEEL light mode
expose cycleSpeed for color changing lights
Add color cycle speed
Owner
|
Interesting, is there a way to set it, or is it just informational? |
mdz
reviewed
Oct 18, 2024
added try for cycleSpeed, updated mock response
mdz
reviewed
Oct 26, 2024
Comment on lines
+468
to
+471
| try: | ||
| self.cycleSpeed = properties["cycleSpeed"] | ||
| except KeyError as e: | ||
| logger.debug(f'Benign: {e}') |
Owner
There was a problem hiding this comment.
Suggested change
| try: | |
| self.cycleSpeed = properties["cycleSpeed"] | |
| except KeyError as e: | |
| logger.debug(f'Benign: {e}') | |
| self.cycleSpeed = properties.get("cycleSpeed", None) |
This way, the code below which accesses self.cycleSpeed won't throw an exception when it wasn't set
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Lights that have mode COLOR_WHEEL also have a speed