# Rooms

## Get Rooms

### Usage

```
openhue get room [roomId|roomName] [flags]
```

Aliases: `room,` `rooms`

### Flags

<table><thead><tr><th width="103">Name</th><th width="114">Shorthand</th><th width="111">Default</th><th>Usage</th></tr></thead><tbody><tr><td>json</td><td>j</td><td><code>false</code></td><td>Format output as JSON</td></tr></tbody></table>

### Examples

```
# List all rooms as a table
openhue get room

# List all rooms as JSON
openhue get room --json

# Get details for a single room in JSON format
openhue get room aa31ba26-98a7-4830-8ae9-1b7caa8b5700 --json

# Get room by name
openhue get room Studio
```

## Set Rooms

### Usage

```
openhue set room [roomId] [flags]
```

Aliases: `room,` `rooms`

### Flags

<table><thead><tr><th width="140">Name</th><th width="114">Shorthand</th><th width="105">Default</th><th>Usage</th></tr></thead><tbody><tr><td>on</td><td></td><td><code>false</code></td><td>Turn on the light(s)</td></tr><tr><td>off</td><td></td><td><code>false</code></td><td>Turn off the light(s)</td></tr><tr><td>brightness</td><td>b</td><td></td><td>Set the brightness [min=0, max=100]</td></tr><tr><td>color</td><td>c</td><td></td><td>Color name. See <a data-mention href="#available-colors">#available-colors</a></td></tr><tr><td>rgb</td><td></td><td></td><td>RGB hexadecimal value (example <code>#CCE5FF</code>)</td></tr><tr><td>cie-x</td><td>x</td><td></td><td>X coordinate in the CIE color space</td></tr><tr><td>cie-y</td><td>y</td><td></td><td>Y coordinate in the CIE color space</td></tr><tr><td>temperature</td><td>t</td><td></td><td>Color temperature in Mirek [min=153, max=500]</td></tr></tbody></table>

### 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 name
openhue set room 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

# Set color temperature (in Mirek) of a single room
openhue set light Studio --on -t 250
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.openhue.io/cli/commands/rooms.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
