mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-14 12:56:37 +00:00
Fix for home-assistant/home-assistant/issues/3378 (#108)
* Fix for home-assistant/home-assistant/issues/3378 * Update state-card-climate.html Fix Travis Error * Fix more-infos display sliders based on target temps not range
This commit is contained in:
parent
ba588fc779
commit
792de4c6ac
@ -241,16 +241,18 @@ Polymer({
|
||||
},
|
||||
|
||||
computeTargetTempHidden: function (stateObj) {
|
||||
return stateObj.attributes.operation_mode === 'off';
|
||||
return !stateObj.attributes.temperature &&
|
||||
!stateObj.attributes.target_temp_low &&
|
||||
!stateObj.attributes.target_temp_high;
|
||||
},
|
||||
|
||||
computeHideTempRangeSlider: function (stateObj) {
|
||||
return stateObj.attributes.operation_mode !== 'auto';
|
||||
return !stateObj.attributes.target_temp_low &&
|
||||
!stateObj.attributes.target_temp_high;
|
||||
},
|
||||
|
||||
computeHideTempSlider: function (stateObj) {
|
||||
return stateObj.attributes.operation_mode === 'auto' ||
|
||||
stateObj.attributes.operation_mode === 'off';
|
||||
return !stateObj.attributes.temperature;
|
||||
},
|
||||
|
||||
computeClassNames: function (stateObj) {
|
||||
|
@ -72,13 +72,12 @@ Polymer({
|
||||
computeTargetTemperature: function (stateObj) {
|
||||
var stateTemp = '';
|
||||
|
||||
if (stateObj.attributes.operation_mode === 'off') {
|
||||
stateTemp = '';
|
||||
} else if (stateObj.attributes.operation_mode === 'auto') {
|
||||
if (stateObj.attributes.target_temp_low &&
|
||||
stateObj.attributes.target_temp_high) {
|
||||
stateTemp = stateObj.attributes.target_temp_low + ' - ' +
|
||||
stateObj.attributes.target_temp_high + ' ' +
|
||||
stateObj.attributes.unit_of_measurement;
|
||||
} else {
|
||||
} else if (stateObj.attributes.temperature) {
|
||||
stateTemp = stateObj.attributes.temperature + ' ' +
|
||||
stateObj.attributes.unit_of_measurement;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user