Including connectorID in site area chart consumption while averaging minute data.
MODIFY
src/storage/mongodb/ConsumptionStorage.ts
src/storage/mongodb/ConsumptionStorage.ts
@@ -218,6 +218,7 @@ export default class ConsumptionStorage {
minute: { '$minute': '$startedAt' },
assetID: '$assetID',
chargeBoxID: '$chargeBoxID',
+ connectorID: '$connectorId',
},
InstantWattsT: { $avg: '$instantWatts' },
InstantAmpsT: { $avg: '$instantAmps' },
@@ -245,7 +246,11 @@ export default class ConsumptionStorage {
}]
},
'_id.chargingStation': {
+ $and: [{
$ne: ['$_id.chargeBoxID', null]
+ },{
+ $ne: ['$_id.connectorID', null]
+ }]
}
}
});

Including connectorID in site area chart consumption while averaging minute data.