You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ui/weather-card.js, several units of measurement are decided based upon whether lengthUnit is set to "km" -- which assumes that the provided data are either all metric or all imperial. The default weather source for hass.io is met.no, which supports mixed metric and imperial data. The result is that the Lovelace weather forecast card (https://www.home-assistant.io/lovelace/weather-forecast/) shows air pressure (which is provided in mbar by the data source) as inHg instead.
Each measurement needs to have its own associated unit tied to the unit of the original data source, particularly air pressure in this instance.
weather-card.js:304:
getUnit(measure) {
const lengthUnit = this.hass.config.unit_system.length;
switch (measure) {
case "air_pressure":
return lengthUnit === "km" ? "hPa" : "inHg";
case "length":
return lengthUnit;
case "precipitation":
return lengthUnit === "km" ? "mm" : "in";
default:
return this.hass.config.unit_system[measure] || "";
}
}
The text was updated successfully, but these errors were encountered:
In ui/weather-card.js, several units of measurement are decided based upon whether lengthUnit is set to "km" -- which assumes that the provided data are either all metric or all imperial. The default weather source for hass.io is met.no, which supports mixed metric and imperial data. The result is that the Lovelace weather forecast card (https://www.home-assistant.io/lovelace/weather-forecast/) shows air pressure (which is provided in mbar by the data source) as inHg instead.
Each measurement needs to have its own associated unit tied to the unit of the original data source, particularly air pressure in this instance.
weather-card.js:304:
The text was updated successfully, but these errors were encountered: