I'm trying to accomplish something simple. When someone turns on a hue light, if it's after 6pm, set the light to a specific color.
I haven't been able to find a way to do this without polling constantly (which seems lame).
The main Hue iOS app has alarms, but lights only respond to alarms when they are turned on. So the app's alarms also fail to set a specific color after 6pm when a light is turned on at 7pm.
The API has now been updated to support this. A rule with the following conditions can be stored on the bridge so no need to keep polling from an app. First condition specifies the times you want the rule to trigger, second condition specifies a certain light must be on and third condition specifies that light must have just changed from being off.
"address":"/config/localtime", "operator":"in", "value":"T18:00:00/T23:00:00"
"address":"/lights/1/state/on","operator":"eq","value":"true"
"address":"/lights/1/state/on","operator":"dx"