sms sent every time
This commit is contained in:
@@ -218,7 +218,7 @@ reactToAlarmData = function(controller_id) {
|
||||
var boxSilent = config.timeoutBox && minutesSinceLastBoxContact > config.timeoutBox;
|
||||
|
||||
var minutesSinceLastPhoneContact = state.lastPhoneContact ? moment(new Date()).diff(moment(state.lastPhoneContact), 'minutes') : -1;
|
||||
var phoneSilent = config.timeoutPhone && minutesSinceLastPhoneContact > config.timeoutPhone;
|
||||
var phoneSilent = false;//config.timeoutPhone && minutesSinceLastPhoneContact > config.timeoutPhone;
|
||||
|
||||
console.log("too ", tooCold, tooHot, boxSilent, phoneSilent);
|
||||
console.log("lpc", state.lastPhoneContact);
|
||||
@@ -252,7 +252,7 @@ function soundTheAlarm(controller_id, tooCold, tooHot, boxSilent, phoneSilent) {
|
||||
};
|
||||
|
||||
var smsSent = !!state.state.alarmSmsSent;
|
||||
var needsToSendSms = !smsSent && phoneSilent;
|
||||
var needsToSendSms = !smsSent // && phoneSilent;
|
||||
|
||||
var sendSmsPart = needsToSendSms ? { 'state.alarmSmsSent': true } : {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user