diff --git a/src/dialogs/more-info/controls/more-info-weather.js b/src/dialogs/more-info/controls/more-info-weather.js
index 38ee714986..cc47677f73 100644
--- a/src/dialogs/more-info/controls/more-info-weather.js
+++ b/src/dialogs/more-info/controls/more-info-weather.js
@@ -105,8 +105,11 @@ class MoreInfoWeather extends LocalizeMixin(PolymerElement) {
-
[[computeDateTime(item.datetime)]]
+
+ [[computeDateTime(item.datetime)]]
+
+ [[computeDate(item.datetime)]]
[[item.templow]] [[getUnit('temperature')]]
@@ -170,21 +173,8 @@ class MoreInfoWeather extends LocalizeMixin(PolymerElement) {
};
}
- computeDateTime(data) {
+ computeDate(data) {
const date = new Date(data);
- const provider = this.stateObj.attributes.attribution;
- if (
- provider === "Powered by Dark Sky" ||
- provider === "Data provided by OpenWeatherMap"
- ) {
- if (new Date().getDay() === date.getDay()) {
- return date.toLocaleTimeString(this.hass.language, { hour: "numeric" });
- }
- return date.toLocaleDateString(this.hass.language, {
- weekday: "long",
- hour: "numeric",
- });
- }
return date.toLocaleDateString(this.hass.language, {
weekday: "long",
month: "short",
@@ -192,6 +182,14 @@ class MoreInfoWeather extends LocalizeMixin(PolymerElement) {
});
}
+ computeDateTime(data) {
+ const date = new Date(data);
+ return date.toLocaleDateString(this.hass.language, {
+ weekday: "long",
+ hour: "numeric",
+ });
+ }
+
getUnit(measure) {
const lengthUnit = this.hass.config.unit_system.length || "";
switch (measure) {