From d60c5236fe1b612a24e167e23c6f0819a02e9171 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Sun, 20 Oct 2019 21:46:10 -0400 Subject: [PATCH] Fixed #160 - Syncing fails if either heat or cool temps are null No longer requiring indoor heat/cool temps non-null as a requirement for syncing a row. --- api/runtime_thermostat.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/runtime_thermostat.php b/api/runtime_thermostat.php index 3fe68b0..7c64d46 100755 --- a/api/runtime_thermostat.php +++ b/api/runtime_thermostat.php @@ -363,6 +363,9 @@ class runtime_thermostat extends cora\crud { * Also threw in null checks on a bunch of other fields just to simplify * the code later on. This happens so rarely that throwing away a whole * row for a null value shouldn't have any noticeable negative effect. + * + * Note: Don't ignore zoneHeatTemp or zoneCoolTemp. Sometimes those are + * legit null as the thermostat may be for heat/cool only (see #160). */ if( $columns['hvacMode'] === null || @@ -370,8 +373,6 @@ class runtime_thermostat extends cora\crud { $columns['zoneHumidity'] === null || $columns['outdoorTemp'] === null || $columns['outdoorHumidity'] === null || - $columns['zoneCoolTemp'] === null || - $columns['zoneHeatTemp'] === null || $columns['compHeat1'] === null || $columns['compHeat2'] === null || $columns['compCool1'] === null ||