diff --git a/src/components/state-history-chart-line.js b/src/components/state-history-chart-line.js index f94507c2df..6100e4022c 100644 --- a/src/components/state-history-chart-line.js +++ b/src/components/state-history-chart-line.js @@ -181,23 +181,63 @@ class StateHistoryChartLine extends LocalizeMixin(PolymerElement) { state.attributes.target_temp_low ); - addColumn(name + " current temperature", true); + addColumn( + `${this.hass.localize( + "ui.card.climate.current_temperature", + "name", + name + )}`, + true + ); if (hasHeat) { - addColumn(name + " heating", true, true); + addColumn( + `${this.hass.localize("ui.card.climate.heating", "name", name)}`, + true, + true + ); // The "heating" series uses steppedArea to shade the area below the current // temperature when the thermostat is calling for heat. } if (hasCool) { - addColumn(name + " cooling", true, true); + addColumn( + `${this.hass.localize("ui.card.climate.cooling", "name", name)}`, + true, + true + ); // The "cooling" series uses steppedArea to shade the area below the current // temperature when the thermostat is calling for heat. } if (hasTargetRange) { - addColumn(name + " target temperature high", true); - addColumn(name + " target temperature low", true); + addColumn( + `${this.hass.localize( + "ui.card.climate.target_temperature_mode", + "name", + name, + "mode", + this.hass.localize("ui.card.climate.high") + )}`, + true + ); + addColumn( + `${this.hass.localize( + "ui.card.climate.target_temperature_mode", + "name", + name, + "mode", + this.hass.localize("ui.card.climate.low") + )}`, + true + ); } else { - addColumn(name + " target temperature", true); + addColumn( + `${this.hass.localize( + "ui.card.climate.target_temperature_entity", + "name", + name + )}`, + true + ); } states.states.forEach((state) => { diff --git a/src/translations/en.json b/src/translations/en.json index c1554d388f..a302af1917 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -402,6 +402,13 @@ "currently": "Currently", "on_off": "On / off", "target_temperature": "Target temperature", + "target_temperature_entity": "{name} target temperature", + "target_temperature_mode": "{name} target temperature {mode}", + "current_temperature": "{name} current temperature", + "heating": "{name} heating", + "cooling": "{name} cooling", + "high": "high", + "low": "low", "target_humidity": "Target humidity", "operation": "Operation", "fan_mode": "Fan mode",