Skip to content

Instantly share code, notes, and snippets.

@iamhatesz
Last active April 3, 2016 20:54
Show Gist options
  • Save iamhatesz/b025825cf9f348f2b7e2 to your computer and use it in GitHub Desktop.
Save iamhatesz/b025825cf9f348f2b7e2 to your computer and use it in GitHub Desktop.
let('the temperature sensor in kitchen')
.state(['temperature'], function (temperature) {
return temperature >= 25;
})
.cause(function (effect) {
effect('air conditioning', { state: 'on' }).now();
});
@iamhatesz
Copy link
Author

turn air conditioning on when temperature in kitchen is higher than 25*C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment