mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-16 05:46:35 +00:00
Correct display of barometric pressure and rain (#13183)
This commit is contained in:
parent
729e2f5248
commit
d23fca4dd1
@ -199,13 +199,15 @@ export const getWeatherUnit = (
|
||||
case "visibility":
|
||||
return stateObj.attributes.visibility_unit || lengthUnit;
|
||||
case "precipitation":
|
||||
return stateObj.attributes.precipitation_unit || lengthUnit === "km"
|
||||
? "mm"
|
||||
: "in";
|
||||
return (
|
||||
stateObj.attributes.precipitation_unit ||
|
||||
(lengthUnit === "km" ? "mm" : "in")
|
||||
);
|
||||
case "pressure":
|
||||
return stateObj.attributes.pressure_unit || lengthUnit === "km"
|
||||
? "hPa"
|
||||
: "inHg";
|
||||
return (
|
||||
stateObj.attributes.pressure_unit ||
|
||||
(lengthUnit === "km" ? "hPa" : "inHg")
|
||||
);
|
||||
case "temperature":
|
||||
return (
|
||||
stateObj.attributes.temperature_unit ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user