Add and use more unit constants (#32122)
* Add and use speed constants * Add and use meter based volume and area constants * Add and use more mass unit constants * Add and use concentration unit constants * Add and use watts per square meter constant * Use more time constants * Use more data constants
This commit is contained in:
parent
c98f50115d
commit
496bd3dddf
44 changed files with 422 additions and 177 deletions
|
@ -6,6 +6,7 @@ import voluptuous as vol
|
|||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import (
|
||||
ATTR_ATTRIBUTION,
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
CONF_MONITORED_CONDITIONS,
|
||||
DEVICE_CLASS_HUMIDITY,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
|
@ -30,7 +31,7 @@ SENSOR_TYPES = {
|
|||
"signal_strength": ["Signal Strength", None, "signal"],
|
||||
"temperature": ["Temperature", TEMP_CELSIUS, "thermometer"],
|
||||
"humidity": ["Humidity", "%", "water-percent"],
|
||||
"air_quality": ["Air Quality", "ppm", "biohazard"],
|
||||
"air_quality": ["Air Quality", CONCENTRATION_PARTS_PER_MILLION, "biohazard"],
|
||||
}
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue