mirror of
https://github.com/home-assistant/core.git
synced 2025-05-02 05:07:52 +00:00
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>
This commit is contained in:
parent
c040be423a
commit
49a69d5ba0
@ -5,6 +5,7 @@ from numbers import Number
|
|||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
PRESSURE,
|
PRESSURE,
|
||||||
|
PRESSURE_BAR,
|
||||||
PRESSURE_HPA,
|
PRESSURE_HPA,
|
||||||
PRESSURE_INHG,
|
PRESSURE_INHG,
|
||||||
PRESSURE_MBAR,
|
PRESSURE_MBAR,
|
||||||
@ -16,6 +17,7 @@ from homeassistant.const import (
|
|||||||
VALID_UNITS: tuple[str, ...] = (
|
VALID_UNITS: tuple[str, ...] = (
|
||||||
PRESSURE_PA,
|
PRESSURE_PA,
|
||||||
PRESSURE_HPA,
|
PRESSURE_HPA,
|
||||||
|
PRESSURE_BAR,
|
||||||
PRESSURE_MBAR,
|
PRESSURE_MBAR,
|
||||||
PRESSURE_INHG,
|
PRESSURE_INHG,
|
||||||
PRESSURE_PSI,
|
PRESSURE_PSI,
|
||||||
@ -24,6 +26,7 @@ VALID_UNITS: tuple[str, ...] = (
|
|||||||
UNIT_CONVERSION: dict[str, float] = {
|
UNIT_CONVERSION: dict[str, float] = {
|
||||||
PRESSURE_PA: 1,
|
PRESSURE_PA: 1,
|
||||||
PRESSURE_HPA: 1 / 100,
|
PRESSURE_HPA: 1 / 100,
|
||||||
|
PRESSURE_BAR: 1 / 100000,
|
||||||
PRESSURE_MBAR: 1 / 100,
|
PRESSURE_MBAR: 1 / 100,
|
||||||
PRESSURE_INHG: 1 / 3386.389,
|
PRESSURE_INHG: 1 / 3386.389,
|
||||||
PRESSURE_PSI: 1 / 6894.757,
|
PRESSURE_PSI: 1 / 6894.757,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user