diff --git a/src/veolia.ts b/src/veolia.ts index aebd363..04979ed 100644 --- a/src/veolia.ts +++ b/src/veolia.ts @@ -94,6 +94,17 @@ export class VeoliaClient { } return soapBody.map((r: any) => { + this.logger.info(`VeoliaClient > getEnergyData`, { + dateReleve: r.dateReleve, + dateReleveFormatted: dayjs(r.dateReleve).format('YYYY-MM-DD'), + dateReleveFormattedIso: dayjs(dayjs(r.dateReleve).format('YYYY-MM-DD')).toISOString(), + now: dayjs().toISOString(), + dateReleve1: dayjs(r.dateReleve).toISOString(), + dateReleve2: dayjs(r.dateReleve).utc().toISOString(), + consommation: r.consommation, + index: r.index, + }) + const dateReleveLocal = dayjs(r.dateReleve).hour(0) const dateReleveUTC = dateReleveLocal.add(dateReleveLocal.utcOffset(), 'minute').utc() this.logger.info(`VeoliaClient > getEnergyData > ${dateReleveUTC.toISOString()}: ${r.consommation}`)