Fixing current forecast

This commit is contained in:
2026-06-24 16:33:43 -04:00
parent f377d0b1c8
commit d20ef97cf1

View File

@@ -68,7 +68,7 @@ export async function queryHourly(start, end) {
const {c} = getClient();
const flux = `
from(bucket: "${c.INFLUX_BUCKET}")
|> range(start: ${start.toIsoString()}, stop: ${end.toIsoString()})
|> range(start: ${start.toISOString()}, stop: ${end.toISOString()})
|> filter(fn: (r) => ${MEASUREMENTS.map(m => `r._measurement == "${m}"`).join(' or ')})
|> aggregateWindow(every: 1h, fn: mean, createEmpty: false)
|> pivot(rowKey: ["_time"], columnKey: ["_field"], valueColumn: "_value")