From 7a62daec40000218218c9e6967b34d87ae2a5a06 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Mon, 22 Mar 2021 21:24:22 -0400 Subject: [PATCH] Fixed #335 - System card sometimes says "Overridden" incorrectly --- api/ecobee_thermostat.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/api/ecobee_thermostat.php b/api/ecobee_thermostat.php index 8da5e95..3e471e5 100644 --- a/api/ecobee_thermostat.php +++ b/api/ecobee_thermostat.php @@ -945,12 +945,8 @@ class ecobee_thermostat extends cora\crud { /** * Get program. This is just a clone of the ecobee_thermostat program with a - * slight modification to the temperature values. First, divide by 10 since - * this data is returned directly by the API. Second, round. This is weird - * to do, but as an example one of my comfort settings said "74" in the - * ecobee GUI but "73.5" in the API. After changing it in the GUI the - * fractional amount was removed. I assume this is an old ecobee bug but it - * affects like 10% of thermostats in my database. + * slight modification to the temperature values. Divide by 10 since this + * data is returned directly by the API. * * @param array $thermostat * @param array $ecobee_thermostat @@ -961,8 +957,8 @@ class ecobee_thermostat extends cora\crud { $program = $ecobee_thermostat['program']; if(isset($program['climates']) === true) { foreach($program['climates'] as &$climate) { - $climate['coolTemp'] = round($climate['coolTemp'] / 10); - $climate['heatTemp'] = round($climate['heatTemp'] / 10); + $climate['coolTemp'] = $climate['coolTemp'] / 10; + $climate['heatTemp'] = $climate['heatTemp'] / 10; } }