From 97acf95180753c68ff62371b079e046e97b96f59 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Wed, 4 Mar 2020 20:31:40 -0500 Subject: [PATCH] Fixed off by 10x error on new temperature profile --- api/profile.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/profile.php b/api/profile.php index 22057ca..e85cad8 100644 --- a/api/profile.php +++ b/api/profile.php @@ -678,7 +678,6 @@ class profile extends cora\api { } $deltas_raw[$sample['type']][$sample['outdoor_temperature']]['deltas_per_hour'][] = $sample['delta_per_hour']; - } } @@ -748,7 +747,7 @@ class profile extends cora\api { isset($deltas[$type][$outdoor_temperature]) === false && count($data['deltas_per_hour']) >= $required_samples ) { - $deltas[$type][$outdoor_temperature] = round(array_median($data['deltas_per_hour']), 2); + $deltas[$type][$outdoor_temperature] = round(array_median($data['deltas_per_hour']) / 10, 2); $profile['metadata']['temperature'][$type]['deltas'][$outdoor_temperature]['samples'] = count($data['deltas_per_hour']); } }