mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 07:07:21 +00:00
turn off some update data points
This commit is contained in:
@ -226,24 +226,24 @@ export class DeviceStatusFirebaseService {
|
||||
});
|
||||
await this.deviceStatusLogRepository.save(newLogs);
|
||||
|
||||
if (addDeviceStatusDto.productType === ProductType.PC) {
|
||||
const energyCodes = new Set([
|
||||
PowerClampEnergyEnum.ENERGY_CONSUMED,
|
||||
PowerClampEnergyEnum.ENERGY_CONSUMED_A,
|
||||
PowerClampEnergyEnum.ENERGY_CONSUMED_B,
|
||||
PowerClampEnergyEnum.ENERGY_CONSUMED_C,
|
||||
]);
|
||||
// if (addDeviceStatusDto.productType === ProductType.PC) {
|
||||
// const energyCodes = new Set([
|
||||
// PowerClampEnergyEnum.ENERGY_CONSUMED,
|
||||
// PowerClampEnergyEnum.ENERGY_CONSUMED_A,
|
||||
// PowerClampEnergyEnum.ENERGY_CONSUMED_B,
|
||||
// PowerClampEnergyEnum.ENERGY_CONSUMED_C,
|
||||
// ]);
|
||||
|
||||
const energyStatus = addDeviceStatusDto?.log?.properties?.find((status) =>
|
||||
energyCodes.has(status.code),
|
||||
);
|
||||
// const energyStatus = addDeviceStatusDto?.log?.properties?.find((status) =>
|
||||
// energyCodes.has(status.code),
|
||||
// );
|
||||
|
||||
if (energyStatus) {
|
||||
await this.powerClampService.updateEnergyConsumedHistoricalData(
|
||||
addDeviceStatusDto.deviceUuid,
|
||||
);
|
||||
}
|
||||
}
|
||||
// if (energyStatus) {
|
||||
// await this.powerClampService.updateEnergyConsumedHistoricalData(
|
||||
// addDeviceStatusDto.deviceUuid,
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (
|
||||
// addDeviceStatusDto.productType === ProductType.CPS ||
|
||||
|
Reference in New Issue
Block a user