mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 07:54:53 +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);
|
await this.deviceStatusLogRepository.save(newLogs);
|
||||||
|
|
||||||
if (addDeviceStatusDto.productType === ProductType.PC) {
|
// if (addDeviceStatusDto.productType === ProductType.PC) {
|
||||||
const energyCodes = new Set([
|
// const energyCodes = new Set([
|
||||||
PowerClampEnergyEnum.ENERGY_CONSUMED,
|
// PowerClampEnergyEnum.ENERGY_CONSUMED,
|
||||||
PowerClampEnergyEnum.ENERGY_CONSUMED_A,
|
// PowerClampEnergyEnum.ENERGY_CONSUMED_A,
|
||||||
PowerClampEnergyEnum.ENERGY_CONSUMED_B,
|
// PowerClampEnergyEnum.ENERGY_CONSUMED_B,
|
||||||
PowerClampEnergyEnum.ENERGY_CONSUMED_C,
|
// PowerClampEnergyEnum.ENERGY_CONSUMED_C,
|
||||||
]);
|
// ]);
|
||||||
|
|
||||||
const energyStatus = addDeviceStatusDto?.log?.properties?.find((status) =>
|
// const energyStatus = addDeviceStatusDto?.log?.properties?.find((status) =>
|
||||||
energyCodes.has(status.code),
|
// energyCodes.has(status.code),
|
||||||
);
|
// );
|
||||||
|
|
||||||
if (energyStatus) {
|
// if (energyStatus) {
|
||||||
await this.powerClampService.updateEnergyConsumedHistoricalData(
|
// await this.powerClampService.updateEnergyConsumedHistoricalData(
|
||||||
addDeviceStatusDto.deviceUuid,
|
// addDeviceStatusDto.deviceUuid,
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// if (
|
// if (
|
||||||
// addDeviceStatusDto.productType === ProductType.CPS ||
|
// addDeviceStatusDto.productType === ProductType.CPS ||
|
||||||
|
|||||||
Reference in New Issue
Block a user