Skip to content

Instantly share code, notes, and snippets.

@AdamMagaluk
Created March 13, 2014 20:59
Show Gist options
  • Save AdamMagaluk/9536887 to your computer and use it in GitHub Desktop.
Save AdamMagaluk/9536887 to your computer and use it in GitHub Desktop.
elroy.filter('crockpot').on('connection',function(crockpot){
elroy.expose(crockpot);
elroy.filter('huehub').on('connection',function(hub){
crockpot.on('lid-closed',function(){
hub.call('blink');
});
crockpot.on('lid-closed',function(){
hub.call('blink');
});
});
});
elroy.find('huehub',function(devices){
devices.forEach(function(hub){
hub.call('blink');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment