From c579cc9a38d80f0feef95808c56e61d8f57ad3d0 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Sun, 2 Jul 2023 06:55:17 -0400 Subject: [PATCH] Fixed #365 - IAQ values above 255 don't get stored Also did database alter and copy to new table. --- api/runtime.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/api/runtime.php b/api/runtime.php index 4f033b3..1a1d657 100644 --- a/api/runtime.php +++ b/api/runtime.php @@ -815,25 +815,13 @@ class runtime extends cora\api { $datas[$sensor['sensor_id']]['air_pressure'] = $value; break; case 'airQuality': - // Apparently this value can get larger than 255. Temporary - // fix until I can rebuild this table. Max I saw: 256 - if($value > 255) { - $datas[$sensor['sensor_id']]['air_quality'] = null; - } else { - $datas[$sensor['sensor_id']]['air_quality'] = $value; - } + $datas[$sensor['sensor_id']]['air_quality'] = $value; break; case 'airQualityAccuracy': $datas[$sensor['sensor_id']]['air_quality_accuracy'] = $value; break; case 'vocPPM': - // Apparently this value can get larger than 65535. Temporary - // fix until I can rebuild this table. Max I saw: 120071 - if($value > 65535) { - $datas[$sensor['sensor_id']]['voc_concentration'] = null; - } else { - $datas[$sensor['sensor_id']]['voc_concentration'] = $value; - } + $datas[$sensor['sensor_id']]['voc_concentration'] = $value; break; case 'co2PPM': $datas[$sensor['sensor_id']]['co2_concentration'] = $value;