From c51c176ed6faf7b63e151862d4378b8b524c3ef1 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 25 Oct 2015 18:46:02 -0700 Subject: [PATCH] Thermostat state is no longer used for target temp --- src/more-infos/more-info-thermostat.js | 2 +- src/state-summary/state-card-thermostat.html | 2 +- src/state-summary/state-card-thermostat.js | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/more-infos/more-info-thermostat.js b/src/more-infos/more-info-thermostat.js index eb240fe452..f3ffd08907 100644 --- a/src/more-infos/more-info-thermostat.js +++ b/src/more-infos/more-info-thermostat.js @@ -32,7 +32,7 @@ export default new Polymer({ }, stateObjChanged(newVal) { - this.targetTemperatureSliderValue = newVal.state; + this.targetTemperatureSliderValue = newVal.attributes.temperature; this.awayToggleChecked = newVal.attributes.away_mode === 'on'; this.tempMin = newVal.attributes.min_temp; diff --git a/src/state-summary/state-card-thermostat.html b/src/state-summary/state-card-thermostat.html index 71a43a1ae9..977d615792 100644 --- a/src/state-summary/state-card-thermostat.html +++ b/src/state-summary/state-card-thermostat.html @@ -26,7 +26,7 @@
-
[[stateObj.stateDisplay]]
+
[[computeTargetTemperature(stateObj)]]
Currently: diff --git a/src/state-summary/state-card-thermostat.js b/src/state-summary/state-card-thermostat.js index 405428326f..4b23b9c791 100644 --- a/src/state-summary/state-card-thermostat.js +++ b/src/state-summary/state-card-thermostat.js @@ -10,4 +10,8 @@ export default new Polymer({ type: Object, }, }, + + computeTargetTemperature(stateObj) { + return `${stateObj.attributes.temperature} ${stateObj.attributes.unit_of_measurement}`; + }, });