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
@@ -4,7 +4,7 @@ Provide a mock sensor platform.
|
||||
Call init before using it in your tests to ensure clean test data.
|
||||
"""
|
||||
import homeassistant.components.sensor as sensor
|
||||
from homeassistant.const import PERCENTAGE
|
||||
from homeassistant.const import PERCENTAGE, PRESSURE_HPA
|
||||
|
||||
from tests.common import MockEntity
|
||||
|
||||
@@ -18,7 +18,7 @@ UNITS_OF_MEASUREMENT = {
|
||||
sensor.DEVICE_CLASS_SIGNAL_STRENGTH: "dB", # signal strength (dB/dBm)
|
||||
sensor.DEVICE_CLASS_TEMPERATURE: "C", # temperature (C/F)
|
||||
sensor.DEVICE_CLASS_TIMESTAMP: "hh:mm:ss", # timestamp (ISO8601)
|
||||
sensor.DEVICE_CLASS_PRESSURE: "hPa", # pressure (hPa/mbar)
|
||||
sensor.DEVICE_CLASS_PRESSURE: PRESSURE_HPA, # pressure (hPa/mbar)
|
||||
sensor.DEVICE_CLASS_POWER: "kW", # power (W/kW)
|
||||
sensor.DEVICE_CLASS_CURRENT: "A", # current (A)
|
||||
sensor.DEVICE_CLASS_ENERGY: "kWh", # energy (Wh/kWh)
|
||||
|
||||
Reference in new issue
Block a user