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

Add Toggle functionality to Lights and Groups #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MichMich
Copy link

Description:

With the current implementation, users are limited to specifically setting their lights and groups to either on or off. While these commands are straightforward and intuitive, there are scenarios where users may want to quickly switch the current state without first checking it.

To enhance the user experience and provide more flexible command options, this Pull Request introduces the toggle functionality for both lights and groups. This new feature fetches the current state of the light or group and switches it to the opposite state (from on to off or vice versa).

New Commands:

Users can now utilize the following commands to toggle the state of their lights and groups:

hueadm light <id> toggle
hued group <id> toggle
  • Convenience: Users no longer need to know the current state of their light or group to change it.
  • Efficiency: Enables quick switching, especially useful in automation scripts or frequent use cases.

@jchillerup
Copy link

@bahamas10 This looks like a nice feature. Could we get this merged and released on npm? Would be very nice! Thanks also for creating this very nice utility.

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