openhue / openhue-cli

OpenHue CLI is a command-line interface for interacting with Philips Hue smart lighting systems.
https://www.openhue.io/cli
Apache License 2.0
41 stars 6 forks source link

Added the 'set room' command #39

Closed thibauult closed 7 months ago

thibauult commented 7 months ago

Usage:

openhue set room -h
Update one or multiple rooms (max is 10 rooms simultaneously).

 You must set the --on flag in order to turn a room on, even if you set the brightness or the color values.

Use "openhue get room" for a complete list of available rooms.

Usage:
  openhue set room [roomId] [flags]

Aliases:
  room, rooms

Examples:

# Turn on a room
openhue set room 15f51223-1e83-4e48-9158-0c20dbd5734e --on

# Turn on multiple rooms
openhue set room 83111103-a3eb-40c5-b22a-02deedd21fcb 8f0a7b52-df25-4bc7-b94d-0dd1a88068ff --on

# Turn off a room identified by its name
openhue set room -n Studio --off

# Set brightness of a single room
openhue set room 15f51223-1e83-4e48-9158-0c20dbd5734e --on --brightness 42.65

# Set color (in RGB) of a single room
openhue set room 15f51223-1e83-4e48-9158-0c20dbd5734e --on --rgb #3399FF

# Set color (in CIE space) of a single room
openhue set room 15f51223-1e83-4e48-9158-0c20dbd5734e --on -x 0.675 -y 0.322

# Set color (by name) of a single room
openhue set room 15f51223-1e83-4e48-9158-0c20dbd5734e --on --color powder_blue

Flags:
  -b, --brightness float32   Set the brightness [min=0, max=100] (default -1)
  -x, --cie-x float32        X coordinate in the CIE color space (example 0.675) (default -1)
  -y, --cie-y float32        Y coordinate in the CIE color space (example 0.322) (default -1)
  -c, --color string         Color name. Allowed: white, lime, green, blue, etc.
  -h, --help                 help for room
      --off                  Turn off the lights
      --on                   Turn on the lights
      --rgb string           RGB hexadecimal value (example #CCE5FF)

Global Flags:
  -n, --name   Set resource(s) by name