diff --git a/src/components/ha-climate-state.html b/src/components/ha-climate-state.html
index a42ce41a2a..4f40313576 100644
--- a/src/components/ha-climate-state.html
+++ b/src/components/ha-climate-state.html
@@ -21,12 +21,11 @@
[[stateObj.state]]
- [[computeTargetTemperature(stateObj)]]
+ [[computeTarget(stateObj)]]
- Currently: [[stateObj.attributes.current_temperature]]
- [[stateObj.attributes.unit_of_measurement]]
+ Currently: [[computeCurrentStatus(stateObj)]]
@@ -41,12 +40,27 @@ class HaClimateState extends Polymer.Element {
};
}
- computeTargetTemperature(stateObj) {
+ computeCurrentStatus(stateObj) {
+ if (stateObj.attributes.current_temperature) {
+ return `${stateObj.attributes.current_temperature} ${stateObj.attributes.unit_of_measurement}`;
+ } else if (stateObj.attributes.current_humidity) {
+ return `${stateObj.attributes.current_humidity} ${stateObj.attributes.unit_of_measurement}`;
+ }
+
+ return '';
+ }
+
+ computeTarget(stateObj) {
if (stateObj.attributes.target_temp_low &&
stateObj.attributes.target_temp_high) {
return `${stateObj.attributes.target_temp_low} - ${stateObj.attributes.target_temp_high} ${stateObj.attributes.unit_of_measurement}`;
} else if (stateObj.attributes.temperature) {
return `${stateObj.attributes.temperature} ${stateObj.attributes.unit_of_measurement}`;
+ } else if (stateObj.attributes.target_humidity_low &&
+ stateObj.attributes.target_humidity_high) {
+ return `${stateObj.attributes.target_humidity_low} - ${stateObj.attributes.target_humidity_high} ${stateObj.attributes.unit_of_measurement}`;
+ } else if (stateObj.attributes.humidity) {
+ return `${stateObj.attributes.humidity} ${stateObj.attributes.unit_of_measurement}`;
}
return '';