Add missing PRESSURE_BAR conversion (#54497)
* Add missing PRESSURE_BAR * style Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net> * valid units Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>pull/54520/head
parent
c040be423a
commit
49a69d5ba0
|
@ -5,6 +5,7 @@ from numbers import Number
|
|||
|
||||
from homeassistant.const import (
|
||||
PRESSURE,
|
||||
PRESSURE_BAR,
|
||||
PRESSURE_HPA,
|
||||
PRESSURE_INHG,
|
||||
PRESSURE_MBAR,
|
||||
|
@ -16,6 +17,7 @@ from homeassistant.const import (
|
|||
VALID_UNITS: tuple[str, ...] = (
|
||||
PRESSURE_PA,
|
||||
PRESSURE_HPA,
|
||||
PRESSURE_BAR,
|
||||
PRESSURE_MBAR,
|
||||
PRESSURE_INHG,
|
||||
PRESSURE_PSI,
|
||||
|
@ -24,6 +26,7 @@ VALID_UNITS: tuple[str, ...] = (
|
|||
UNIT_CONVERSION: dict[str, float] = {
|
||||
PRESSURE_PA: 1,
|
||||
PRESSURE_HPA: 1 / 100,
|
||||
PRESSURE_BAR: 1 / 100000,
|
||||
PRESSURE_MBAR: 1 / 100,
|
||||
PRESSURE_INHG: 1 / 3386.389,
|
||||
PRESSURE_PSI: 1 / 6894.757,
|
||||
|
|
Loading…
Reference in New Issue