Bug fix - jsObject to reportToSend
This commit is contained in:
parent
c5c5b21f47
commit
59256ebec6
1 changed files with 2 additions and 1 deletions
|
|
@ -1483,7 +1483,7 @@ exports.install = function(instance) {
|
|||
|
||||
//We empty reportToSend object, but we want to keep contactor data for a current day
|
||||
function emptyReportToSend() {
|
||||
Object.keys(reportToSend).forEach(key => { if (key !== "contactor") delete jsObject[key] });
|
||||
Object.keys(reportToSend).forEach(key => { if (key !== "contactor") delete reportToSend[key] });
|
||||
reportToSend["night_no_data"] = [];
|
||||
reportToSend["night_dimming=0"] = [];
|
||||
reportToSend["night_power=0"] = [];
|
||||
|
|
@ -1500,6 +1500,7 @@ exports.install = function(instance) {
|
|||
if (sunCalcResult.dawn_hours === d.getHours() && sunCalcResult.dawn_minutes === d.getMinutes()) {
|
||||
delete reportToSend.contactor;
|
||||
reportToSend["contactor"] = { off: [], on: [] };
|
||||
console.log("Cmd-mngr: Contactor data deleted in daily report");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue