bahamas10 / hue-cli

A command line interface to phillips hue
http://bahamas10.github.com/hue-cli/
221 stars 24 forks source link

Add alias funcionality #29

Closed danhper closed 3 years ago

danhper commented 4 years ago

I have sets of 3 lamps and thought it would be nice to be able to have alias for lamps. This PR allows to do the following

$ hue alias bedroom 4,5,6
$ hue alias kitchen 1,2,3
$ hue alias
{
  "kitchen": "1,2,3",
  "bedroom": "4,5,6"
}
$ hue lights bedroom on
$ hue lights kitchen -20
Xantios commented 3 years ago

I would love this feature!

danhper commented 3 years ago

I have been using this quite actively since I sent this PR, it's working great for me at least.

bahamas10 commented 3 years ago

thank you, LGTM

published as v0.4.0 on npm

I consider hue-cli deprecated and replaced by hueadm (https://github.com/bahamas10/hueadm). In hueadm, you can create a group, and that will allow you to modify multiple lights with a single API call, whereas this CLI will create 1 request per light. Either way though, both will get the job done.