mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 14:56:37 +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":
|
case "visibility":
|
||||||
return stateObj.attributes.visibility_unit || lengthUnit;
|
return stateObj.attributes.visibility_unit || lengthUnit;
|
||||||
case "precipitation":
|
case "precipitation":
|
||||||
return stateObj.attributes.precipitation_unit || lengthUnit === "km"
|
return (
|
||||||
? "mm"
|
stateObj.attributes.precipitation_unit ||
|
||||||
: "in";
|
(lengthUnit === "km" ? "mm" : "in")
|
||||||
|
);
|
||||||
case "pressure":
|
case "pressure":
|
||||||
return stateObj.attributes.pressure_unit || lengthUnit === "km"
|
return (
|
||||||
? "hPa"
|
stateObj.attributes.pressure_unit ||
|
||||||
: "inHg";
|
(lengthUnit === "km" ? "hPa" : "inHg")
|
||||||
|
);
|
||||||
case "temperature":
|
case "temperature":
|
||||||
return (
|
return (
|
||||||
stateObj.attributes.temperature_unit ||
|
stateObj.attributes.temperature_unit ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user