From 9992abc5928ffd7daea6da5fc250fcb9294673e9 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Thu, 24 Oct 2019 21:35:40 -0400 Subject: [PATCH] Updated thermostat weather to return values in tenths. --- api/ecobee_thermostat.php | 8 ++++---- js/component/card/system.js | 2 +- js/component/modal/weather.js | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api/ecobee_thermostat.php b/api/ecobee_thermostat.php index 47f1e3f..e4c5d1b 100644 --- a/api/ecobee_thermostat.php +++ b/api/ecobee_thermostat.php @@ -754,7 +754,7 @@ class ecobee_thermostat extends cora\crud { $ecobee_weather = $ecobee_thermostat['json_weather']['forecasts'][0]; if(isset($ecobee_weather['dewpoint']) === true) { - $weather['dew_point'] = ($ecobee_weather['dewpoint'] / 10); + $weather['dew_point'] = $ecobee_weather['dewpoint']; } // Returned in MB (divide by 33.864 to get inHg) @@ -767,15 +767,15 @@ class ecobee_thermostat extends cora\crud { } if(isset($ecobee_weather['tempHigh']) === true) { - $weather['temperature_high'] = ($ecobee_weather['tempHigh'] / 10); + $weather['temperature_high'] = $ecobee_weather['tempHigh']; } if(isset($ecobee_weather['tempLow']) === true) { - $weather['temperature_low'] = ($ecobee_weather['tempLow'] / 10); + $weather['temperature_low'] = $ecobee_weather['tempLow']; } if(isset($ecobee_weather['temperature']) === true) { - $weather['temperature'] = ($ecobee_weather['temperature'] / 10); + $weather['temperature'] = $ecobee_weather['temperature']; } if(isset($ecobee_weather['windBearing']) === true) { diff --git a/js/component/card/system.js b/js/component/card/system.js index 1a6385c..4e5a7e1 100644 --- a/js/component/card/system.js +++ b/js/component/card/system.js @@ -122,7 +122,7 @@ beestat.component.card.system.prototype.decorate_weather_ = function(parent) { .innerHTML(beestat.temperature({ 'round': 0, 'units': false, - 'temperature': thermostat.weather.temperature + 'temperature': (thermostat.weather.temperature / 10) })); temperature_container.appendChild(temperature_whole_container); diff --git a/js/component/modal/weather.js b/js/component/modal/weather.js index 7240308..f83d3f8 100755 --- a/js/component/modal/weather.js +++ b/js/component/modal/weather.js @@ -114,7 +114,7 @@ beestat.component.modal.weather.prototype.decorate_contents_ = function(parent) beestat.temperature({ 'round': 0, 'units': true, - 'temperature': thermostat.weather.temperature + 'temperature': (thermostat.weather.temperature / 10) }) ) .style({ @@ -143,7 +143,7 @@ beestat.component.modal.weather.prototype.decorate_contents_ = function(parent) beestat.temperature({ 'round': 0, 'units': false, - 'temperature': thermostat.weather.temperature_low + 'temperature': (thermostat.weather.temperature_low / 10) }) ) .style({ @@ -158,7 +158,7 @@ beestat.component.modal.weather.prototype.decorate_contents_ = function(parent) beestat.temperature({ 'round': 0, 'units': false, - 'temperature': thermostat.weather.temperature_high + 'temperature': (thermostat.weather.temperature_high / 10) }) ) ); @@ -204,7 +204,7 @@ beestat.component.modal.weather.prototype.decorate_contents_ = function(parent) 'value': beestat.temperature({ 'round': 0, 'units': true, - 'temperature': thermostat.weather.dew_point + 'temperature': (thermostat.weather.dew_point / 10) }) }, {