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
@@ -16,6 +16,7 @@ from homeassistant.const import (
|
||||
CONF_UNIT_SYSTEM_METRIC,
|
||||
PERCENTAGE,
|
||||
POWER_WATT,
|
||||
PRESSURE_HPA,
|
||||
STATE_UNAVAILABLE,
|
||||
STATE_UNKNOWN,
|
||||
TEMP_CELSIUS,
|
||||
@@ -48,10 +49,10 @@ async def async_test_temperature(hass, cluster, entity_id):
|
||||
async def async_test_pressure(hass, cluster, entity_id):
|
||||
"""Test pressure sensor."""
|
||||
await send_attributes_report(hass, cluster, {1: 1, 0: 1000, 2: 10000})
|
||||
assert_state(hass, entity_id, "1000", "hPa")
|
||||
assert_state(hass, entity_id, "1000", PRESSURE_HPA)
|
||||
|
||||
await send_attributes_report(hass, cluster, {0: 1000, 20: -1, 16: 10000})
|
||||
assert_state(hass, entity_id, "1000", "hPa")
|
||||
assert_state(hass, entity_id, "1000", PRESSURE_HPA)
|
||||
|
||||
|
||||
async def async_test_illuminance(hass, cluster, entity_id):
|
||||
|
||||
Reference in new issue
Block a user