mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 13:26:34 +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) {
|
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) {
|
computeHideTempRangeSlider: function (stateObj) {
|
||||||
return stateObj.attributes.operation_mode !== 'auto';
|
return !stateObj.attributes.target_temp_low &&
|
||||||
|
!stateObj.attributes.target_temp_high;
|
||||||
},
|
},
|
||||||
|
|
||||||
computeHideTempSlider: function (stateObj) {
|
computeHideTempSlider: function (stateObj) {
|
||||||
return stateObj.attributes.operation_mode === 'auto' ||
|
return !stateObj.attributes.temperature;
|
||||||
stateObj.attributes.operation_mode === 'off';
|
|
||||||
},
|
},
|
||||||
|
|
||||||
computeClassNames: function (stateObj) {
|
computeClassNames: function (stateObj) {
|
||||||
|
@ -72,13 +72,12 @@ Polymer({
|
|||||||
computeTargetTemperature: function (stateObj) {
|
computeTargetTemperature: function (stateObj) {
|
||||||
var stateTemp = '';
|
var stateTemp = '';
|
||||||
|
|
||||||
if (stateObj.attributes.operation_mode === 'off') {
|
if (stateObj.attributes.target_temp_low &&
|
||||||
stateTemp = '';
|
stateObj.attributes.target_temp_high) {
|
||||||
} else if (stateObj.attributes.operation_mode === 'auto') {
|
|
||||||
stateTemp = stateObj.attributes.target_temp_low + ' - ' +
|
stateTemp = stateObj.attributes.target_temp_low + ' - ' +
|
||||||
stateObj.attributes.target_temp_high + ' ' +
|
stateObj.attributes.target_temp_high + ' ' +
|
||||||
stateObj.attributes.unit_of_measurement;
|
stateObj.attributes.unit_of_measurement;
|
||||||
} else {
|
} else if (stateObj.attributes.temperature) {
|
||||||
stateTemp = stateObj.attributes.temperature + ' ' +
|
stateTemp = stateObj.attributes.temperature + ' ' +
|
||||||
stateObj.attributes.unit_of_measurement;
|
stateObj.attributes.unit_of_measurement;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user