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

expose cycleSpeed for color changing lights #53

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

smatsmats
Copy link
Contributor

Lights that have mode COLOR_WHEEL also have a speed

{   'color': {'blue': 0, 'green': 0, 'red': 0, 'white': 0},
    'cycleSpeed': 3,
    'exterior': False,
    'intensity': 60,
    'irt': None,
    'mode': 'COLOR_WHEEL',
    'zone': 1}

@mdz
Copy link
Owner

mdz commented Oct 18, 2024

Interesting, is there a way to set it, or is it just informational?

smarttub/api.py Outdated Show resolved Hide resolved
steve mats mats and others added 2 commits October 26, 2024 08:01
Comment on lines +468 to +471
try:
self.cycleSpeed = properties["cycleSpeed"]
except KeyError as e:
logger.debug(f'Benign: {e}')
Copy link
Owner

Choose a reason for hiding this comment

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants