Set device color (hex)
hubitat_set_colorSet a Hubitat ColorControl device's color using a hex value like #FF00AA or FF00AA. Converts the hex to the URL-encoded format Hubitat's Maker API expects, ensuring correct color configuration without manual JSON encoding.
Instructions
Set a ColorControl device color from a hex string. Builds the URL-encoded JSON map Maker API expects (including Hubitat's hex extension). Nobody constructs this by hand correctly.
Use when: setting bulb color from #RRGGBB or RRGGBB. Do NOT use when: only changing level or on/off.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hex | Yes | Hex color, e.g. FF00AA or #FF00AA | |
| device_id | Yes | Maker API device ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hex | Yes | ||
| device | No | ||
| device_id | Yes |