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.
@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.
Description:
With the current implementation, users are limited to specifically setting their lights and groups to either
on
oroff
. 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 (fromon
tooff
or vice versa).New Commands:
Users can now utilize the following commands to toggle the state of their lights and groups: