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

New Get and Set scene commands #41

Closed thibauult closed 7 months ago

thibauult commented 7 months ago

This PR introduces 2 new scenes' related commands:

openhue get scene

Displays all the scenes with their main information, including the room they belong to.

Usage:
  openhue get scene [sceneId|sceneName] [flags]

Aliases:
  scene, scenes

Examples:

# List all scenes
openhue get scene

# List all scenes as JSON 
openhue get scene --json

# Filter scenes for a given room name
openhue get scenes --room "Living Room"

# Filter scenes for a given room ID
openhue get scenes -r 878a65d6-613b-4239-8b77-588b535bfb4a

# List multiple scenes using either the ID or the name of the scene
openhue get scenes "Palm Beach" Nebula 462e54d9-ec5d-4bf6-879d-ad34cb9a692e

Flags:
  -h, --help          help for scene
  -r, --room string   Filter scenes by room (name or ID)

Global Flags:
  -j, --json   Format output as JSON

openhue set scene

This command allows the activate a scene using either a static or a dynamic palette.

Usage:
  openhue set scene [sceneId|sceneName] [flags]

Aliases:
  scene, scenes

Examples:

# Activate a scene
openhue set scene Soho

# Activate a scene by ID
openhue set scene 62af7df3-d390-4408-a7ac-4b6b8805531b

# Activate a scene in a specific room
openhue set scene Soho -r Studio

# Activate a scene with a dynamic palette
openhue set scene Soho -a dynamic

Flags:
  -a, --action string   action to perform on the scene. allowed: active (default), dynamic or static
  -h, --help            help for scene
  -r, --room string     room where the scene is located (in case multiple scenes with the same name exist)