Skip to content

Instantly share code, notes, and snippets.

@kou029w
Created January 14, 2020 11:23
Show Gist options
  • Save kou029w/258d3c17d1d58510ffa626436674b1b5 to your computer and use it in GitHub Desktop.
Save kou029w/258d3c17d1d58510ffa626436674b1b5 to your computer and use it in GitHub Desktop.
tottori-iot.netlify.com 設定例抜粋
speechAgent: {
enable: true,
notifyWhen: () => {
const hours = new Date().getHours();
return 7 <= hours && hours < 19;
},
notifyScript: ({ temperature, eTVOC }) => {
return [
temperature <= 18 ? "暖房を入れましょう" : null,
28 <= temperature ? "暖房を切りましょう" : null,
600 <= eTVOC ? "換気をしましょう" : null
].join("、");
}
},
@kou029w
Copy link
Author

kou029w commented Jan 22, 2020

別のサンプル https://git.io/JvL4q

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