From d03b4c6158d97048ac02252f1570749ea1a748d7 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Wed, 4 Mar 2026 13:26:52 -0600 Subject: [PATCH] hotfix for the delta temp to switch over from listing to sampling the measurements --- src/gate/GateDeltaTempGraph.tsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/gate/GateDeltaTempGraph.tsx b/src/gate/GateDeltaTempGraph.tsx index fc5b253..d547b1c 100644 --- a/src/gate/GateDeltaTempGraph.tsx +++ b/src/gate/GateDeltaTempGraph.tsx @@ -104,28 +104,25 @@ export default function GateDeltaTempGraph(props: Props){ */ useEffect(()=>{ //get the measurements for the temp component - componentAPI.listUnitMeasurements( + componentAPI.sampleUnitMeasurements( deviceID, tempComponent.key(), start.toISOString(), end.toISOString(), - 500, - 0, - "timestamp", + 500 ).then(resp => { + console.log(resp) if(resp.data.measurements){ let tempCompMeasurements = resp.data.measurements.map(um => UnitMeasurement.any(um, user)); //if there is an ambient component, then treat the temp component like a single sensor and not a chain, and use the ambient measurements as the inlet if(ambient){ //need to then load the measurements for the ambient component - componentAPI.listUnitMeasurements( + componentAPI.sampleUnitMeasurements( deviceID, ambient.key(), start.toISOString(), end.toISOString(), - 500, - 0, - "timestamp", + 500 ).then(resp => { let ambientMeasurements = resp.data.measurements.map(um => UnitMeasurement.any(um, user)); //now loop through each of them to 'combine' them into a single array