Skip to content

Instantly share code, notes, and snippets.

@xzenzza
Created December 5, 2015 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xzenzza/af5cf5998211809516c5 to your computer and use it in GitHub Desktop.
Save xzenzza/af5cf5998211809516c5 to your computer and use it in GitHub Desktop.
// Example: Convert temp from C to F and truncate to 2 decimal places.
// return (datasources["MyDatasource"].sensor.tempInF * 1.8 + 32).toFixed(2);
var Door = datasources["KKMakerClub"]["Door"];
if (Door >=1000 ) {
return 1;
} else {
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment