Last active
April 3, 2016 20:54
-
-
Save iamhatesz/b025825cf9f348f2b7e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let('the temperature sensor in kitchen') | |
.state(['temperature'], function (temperature) { | |
return temperature >= 25; | |
}) | |
.cause(function (effect) { | |
effect('air conditioning', { state: 'on' }).now(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
turn air conditioning on when temperature in kitchen is higher than 25*C