-
+
- [[getTemperature(stateObj.attributes.temperature)]]
+
+ [[stateObj.attributes.temperature]][[getUnit('temperature')]]
+
-
- [[localize('ui.card.weather.attributes.humidity')]]:
- [[stateObj.attributes.humidity]] %
-
-
+
- [[localize('ui.card.weather.attributes.visibility')]]:
- [[getVisibilty(stateObj.attributes.visibility)]]
+ [[localize('ui.card.weather.attributes.air_pressure')]]:
+ [[stateObj.attributes.pressure]] hPa
+
+
+
+
+ [[localize('ui.card.weather.attributes.humidity')]]:
+ [[stateObj.attributes.humidity]] %
+
+
+
+
+ [[localize('ui.card.weather.attributes.wind_speed')]]:
+ [[getWind(stateObj.attributes.wind_speed, stateObj.attributes.wind_bearing, localize)]]
-
- [[localize('ui.card.weather.attributes.wind_speed')]]:
- [[getWind(stateObj.attributes.wind_speed, stateObj.attributes.wind_bearing, localize)]]
-
-
[[computeState(stateObj.state, localize)]]
+
+ [[computeState(stateObj.state, localize)]]
+
@@ -96,9 +125,9 @@
-
[[item.temperature]]°
+
[[item.temperature]] [[getUnit('temperature')]]
- [[item.templow]]°
+ [[item.templow]] [[getUnit('temperature')]]
@@ -161,7 +190,7 @@ class HaWeatherCard extends
}
computeForecast(forecast) {
- return forecast && forecast.slice(0, 7);
+ return forecast && forecast.slice(0, 5);
}
getUnit(unit) {
@@ -180,10 +209,6 @@ class HaWeatherCard extends
return this.weatherIcons[condition];
}
- getTemperature(temp) {
- return `${temp}${this.getUnit('temperature')}`;
- }
-
windBearingToText(degree) {
const degreenum = parseInt(degree);
if (isFinite(degreenum)) {
@@ -195,15 +220,11 @@ class HaWeatherCard extends
getWind(speed, bearing, localize) {
if (bearing != null) {
const cardinalDirection = this.windBearingToText(bearing);
- return `${speed} ${this.getUnit('length')}/h (${localize(cardinalDirection.toLowerCase()) || cardinalDirection})`;
+ return `${speed} ${this.getUnit('length')}/h (${localize(`ui.card.weather.cardinal_direction.${cardinalDirection.toLowerCase()}`) || cardinalDirection})`;
}
return `${speed} ${this.getUnit('length')}/h`;
}
- getVisibilty(visibilty) {
- return `${visibilty} ${this.getUnit('length')}`;
- }
-
computeDateTime(data) {
const date = new Date(data);
const provider = this.stateObj.attributes.attribution;
diff --git a/src/dialogs/more-info/controls/more-info-weather.html b/src/dialogs/more-info/controls/more-info-weather.html
index ce30c727c6..68e8663485 100644
--- a/src/dialogs/more-info/controls/more-info-weather.html
+++ b/src/dialogs/more-info/controls/more-info-weather.html
@@ -47,23 +47,6 @@
[[localize('ui.card.weather.attributes.temperature')]]
[[stateObj.attributes.temperature]] [[getUnit('temperature')]]
-
-
-
[[localize('ui.card.weather.attributes.wind_speed')]]
-
[[getWind(stateObj.attributes.wind_speed, stateObj.attributes.wind_bearing, localize)]]
-