Fix formatting of weather extrema temperatures (#10306)

This commit is contained in:
Philip Allgaier 2021-10-18 22:07:16 +02:00 committed by GitHub
parent a8486eda9f
commit f1cb21e7fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -245,17 +245,9 @@ const getWeatherExtrema = (
const unit = getWeatherUnit(hass!, "temperature");
return html`
${tempHigh
? `
${tempHigh} ${unit}
`
: ""}
${tempHigh ? `${formatNumber(tempHigh, hass.locale)} ${unit}` : ""}
${tempLow && tempHigh ? " / " : ""}
${tempLow
? `
${tempLow} ${unit}
`
: ""}
${tempLow ? `${formatNumber(tempLow, hass.locale)} ${unit}` : ""}
`;
};