Skip to content

Instantly share code, notes, and snippets.

/hueman.yml Secret

Created March 23, 2013 20:43
Show Gist options
  • Save anonymous/eec096db0c89830f75c5 to your computer and use it in GitHub Desktop.
Save anonymous/eec096db0c89830f75c5 to your computer and use it in GitHub Desktop.
plugins:
scene:
path: 'hueman.plugins.Scene'
settings:
sunset:
orange:
quantity: 20%
priority: 80
hue: 46789
sat: 150
yellows:
quantity: 60%
priority: 90
hue: 23133
sat: 200
reds:
quantity: 10%
priority: 70
hue: 0
sat: 200
class Scene(object):
def __init__(self, **scenes):
self.scenes = scenes
def __call__(self, controller, scene):
try:
scene = self.scenes[scene]
except KeyError:
return
n_lights = len(controller)
presets = self._do_priority_magic(n_lights, scene)
for light, state in zip(controller, presets):
light.apply(state)
def _do_priority_magic(n, scene):
return # TODO
hueman -g office scene:sunset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment