Skip to content

Add toggle method #4

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

Merged
merged 1 commit into from
Apr 12, 2019
Merged

Add toggle method #4

merged 1 commit into from
Apr 12, 2019

Conversation

brentru
Copy link
Member

@brentru brentru commented Apr 12, 2019

Not a native feature of the Hue API, but super useful to have for building electronics projects (physical toggle button, virtual touchscreen toggle!)

  • Gets the state of a specified light
  • Parses the 'on' parameter out from the light state, inverts it
  • Sends the inverted 'on' parameter to set_light to the light specified

@brentru brentru requested review from jerryneedell and a team April 12, 2019 21:30
@ladyada ladyada merged commit d7c426e into adafruit:master Apr 12, 2019
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