Update to include tick thresholds to avoid spammy messages
This commit is contained in:
parent
f1562451cc
commit
ea26bc54ed
@ -39,8 +39,11 @@ async function temperatoTick() {
|
||||
|
||||
if (response.getSensorData.temperato >= SET_POINT) {
|
||||
numberOfTicks++;
|
||||
if (numberOfTicks == TICK_THRESHOLD) {
|
||||
numberOfTicks = 0;
|
||||
if (numberOfTicks == TICK_THRESHOLD) {
|
||||
numberOfTicks = 0;
|
||||
}
|
||||
|
||||
if (numberOfTicks == 0) {
|
||||
const basicAuth = Buffer.from(`${USERNAME}:${PASSWORD}`).toString('base64');
|
||||
await fetch(NOTIF_URL, {
|
||||
method: 'post',
|
||||
|
Loading…
Reference in New Issue
Block a user