bahamas10 / hueadm

A command line management interface to Philips hue
206 stars 13 forks source link

Add Toggle functionality to Lights and Groups #17

Open MichMich opened 1 year ago

MichMich commented 1 year ago

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
jchillerup commented 1 week ago

@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.