Thermostat state is no longer used for target temp

This commit is contained in:
Paulus Schoutsen 2015-10-25 18:46:02 -07:00
parent 21ddacc5a9
commit c51c176ed6
3 changed files with 6 additions and 2 deletions

View File

@ -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;

View File

@ -26,7 +26,7 @@
<div class='horizontal justified layout'>
<state-info state-obj="[[stateObj]]"></state-info>
<div class='state'>
<div class='target'>[[stateObj.stateDisplay]]</div>
<div class='target'>[[computeTargetTemperature(stateObj)]]</div>
<div class='current'>
<span>Currently: </span>

View File

@ -10,4 +10,8 @@ export default new Polymer({
type: Object,
},
},
computeTargetTemperature(stateObj) {
return `${stateObj.attributes.temperature} ${stateObj.attributes.unit_of_measurement}`;
},
});