Use pressure constants in code base (#40262)
This commit is contained in:
1 parent
f563068ce6
commit
e330468a13
17 files changed
+56
-30
No files matched your search
@@ -8,6 +8,8 @@ from homeassistant.const import (
|
||||
AREA_SQUARE_METERS,
|
||||
CONF_MONITORED_CONDITIONS,
|
||||
PERCENTAGE,
|
||||
PRESSURE_INHG,
|
||||
PRESSURE_MBAR,
|
||||
TEMP_CELSIUS,
|
||||
TEMP_FAHRENHEIT,
|
||||
)
|
||||
@@ -32,7 +34,7 @@ SENSOR_TYPES = [
|
||||
SENSOR_UNITS_IMPERIAL = {
|
||||
"Temperature": TEMP_FAHRENHEIT,
|
||||
"Humidity": PERCENTAGE,
|
||||
"Pressure": "inHg",
|
||||
"Pressure": PRESSURE_INHG,
|
||||
"Luminance": f"cd/{AREA_SQUARE_METERS}",
|
||||
"Voltage": "mV",
|
||||
}
|
||||
@@ -41,7 +43,7 @@ SENSOR_UNITS_IMPERIAL = {
|
||||
SENSOR_UNITS_METRIC = {
|
||||
"Temperature": TEMP_CELSIUS,
|
||||
"Humidity": PERCENTAGE,
|
||||
"Pressure": "mbar",
|
||||
"Pressure": PRESSURE_MBAR,
|
||||
"Luminance": f"cd/{AREA_SQUARE_METERS}",
|
||||
"Voltage": "mV",
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user