Skip to content


Switch branches/tags


Failed to load latest commit information.
Latest commit message
Commit time

Philips Hue Controller for Alfred

Quickly and easily control Philips Hue lights with Alfred.

Download the latest version on the releases page.


⚠️ Using this workflow macOS 12.3+ ⚠️

Last updated May 22, 2022

This workflow has a dependency on Python 2 which was removed in macOS version 12.3. This means the workflow will no longer work if you've upgraded macOS to the latest version.

In order for this workflow to "just work", it will need to be upgraded to support Python 3, but this requires all its dependencies to add Python 3 support as well, which has not happened yet, particularly this library:

In the mean time, to make this workflow work you must perform the following steps to install Python 2 using Homebrew: and then download the latest release from the releases page.

See the open issues for additional support regarding this change.


Control the state of lights and rooms

  • Set brightness for lights or groups
  • Set color for lights or groups (using CSS color names or HEX codes)
  • Set colorloop effect on lights or groups
  • Set reminders
  • Set groups to custom scenes you've configured in the Philips Hue app
  • Rename lights
Light control
Control lights
Group control
Control groups

Note: groups:0 as seen above is autocompleted by the workflow after selecting room name, or in this case "All lights". Group '0' always refers to all lights. Each room name is associated with a specific group ID on the bridge. Remember this ID if you wish to create hotkeys for rooms (see below).

Color Harmonies

This workflow has some bonus custom color science logic built in that let's you use color wheel relationships such as analogous, complementary, triad, etc. to set group colors. Give it a try to see how it works:

Set harmony
Color Harmony

Hotkeys API

This workflow uses a special action string format that you can use to create a hotkey for any action you could otherwise perform using the hue keyword, which follows the following pattern:


Some example valid action strings are:

groups:0:on                    # Turn on all lights (note: Group "0" refers to all lights)
groups:0:color:random          # Set all lights to a random color
groups:1:set:<scene_name>      # Set a scene on group with ID "1"
lights:1:reminder:180          # 180 seconds
lights:1:bri:50                # 50 percent
lights:3:effect:colorloop      # Turn on colorloop effect on light with id "3"

Combine multiple commands into one hotkey

You can combine multiple commands into one hotkey by joining action strings with |, for example:


To create a new hotkey, open Alfred, go to Workflows and select the Philips Hue Controller workflow in the sidebar. In the main panel right click and select Triggers > Hotkey. Set the text argument to the action string, then connect that to the same block as the other preloaded hotkeys.

To make this even easier, open history.txt inside of the Workflow's directory (right click Philips Hue Controller, select "Open in Finder") and there you can see history of all commands. This makes creating a hotkey for setting a scene easier, for example, since scenes have long ID strings e.g. ESyAHbZCG8RJTxi.

Setup & Installation

  1. Download the workflow

  2. The first time you run the workflow it will ask you to press the button on top of the Hue bridge then action the item to authorize the workflow to control your Hue lights:


The workflow automatically attempts to find the bridge on your local network. You can also manually specify the bridge's IP address. For example, if your bridge's IP is



Thanks to iconsphere, To Uyen, Setyo Ari Wibowo, Austin Condiff, H Alberto Gongora, Andreis Kirma, and Ananth from the Noun Project for icons.