From dd0ddd44522c6c384e7edf28d872ed9380191d66 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Tue, 24 Jan 2023 17:26:08 -0500 Subject: [PATCH] Fixed #384 - Out of range value for column 'outdoor_temperature' --- api/runtime.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/runtime.php b/api/runtime.php index a057105..e91b543 100644 --- a/api/runtime.php +++ b/api/runtime.php @@ -509,6 +509,7 @@ class runtime extends cora\api { $columns['zoneAveTemp'] === null || $columns['zoneHumidity'] === null || $columns['outdoorTemp'] === null || + $columns['outdoorTemp'] < -1000 || // #384 $columns['outdoorHumidity'] === null || $columns['compHeat1'] === null || $columns['compHeat2'] === null || @@ -629,7 +630,10 @@ class runtime extends cora\api { null : $climate_runtime_thermostat_text['runtime_thermostat_text_id']; - if (isset($columns['zoneCoolTemp']) === true) { + if ( + isset($columns['zoneCoolTemp']) === true && + $columns['zoneCoolTemp'] > 0 // #384 + ) { $data['setpoint_cool'] = $columns['zoneCoolTemp'] * 10; } else { $data['setpoint_cool'] = null;