Fish command to toggle Hue lighting scenes via Home Assistant API.
- Fish shell
- jq
- curl
- Home Assistant reachable via network
-
Copy or symlink:
functions/hue.fish
to~/.config/fish/functions
completions/hue.fish
to~/.config/fish/completions
-
Configure with environment variables:
-
HA_API_TOKEN
: the Home Assistant API token to use (required) -
HA_API_URL
: home assistant URL to call (defaults tohttp://homeassistant.local:8123/api
) -
HA_SCENE_PREFIX
: scene prefix to look up room lights (defaults toscene.office
)- The scene name gets appended to this prefix, e.g.
scene.office_frosty_dawn
- With the token and URL configured, you can use
hue-states
to list your scene names
- The scene name gets appended to this prefix, e.g.
-
# List available Hue scenes
$ hue
arctic_aurora
emerald_isle
frosty_dawn
galaxy
soho
# Set Hue scene to 'galaxy'
$ hue galaxy