Update to no longer use data store for this

This commit is contained in:
William Moore 2023-01-12 03:55:23 -06:00
parent 3a31fd1762
commit 5bd17e1e32
2 changed files with 3 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{
"name": "temperato",
"version": "1.0.0",
"version": "2.0.0",
"description": "",
"main": "src/index.ts",
"module": "src/index.ts",

View File

@ -37,13 +37,7 @@ let numberOfEarlyTicks = 0;
async function temperatoTick() {
try {
const response = await fetch(ENDPOINT, {
headers: {
'authorization': process.env.AUTH,
}
}
);
const response = await fetch(ENDPOINT);
const data: any = await response.json();
if (data.temperature < SET_POINT && data.temperature >= EARLY_WARNING) {
@ -83,4 +77,4 @@ async function temperatoTick() {
}
}
setInterval(() => temperatoTick(), SLEEP_TIMER);
setInterval(() => temperatoTick(), SLEEP_TIMER);