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:
1 parent
c98f50115d
commit
496bd3dddf
44 files changed
+422
-177
No files matched your search
@@ -19,8 +19,8 @@ from homeassistant.const import (
|
||||
CONF_LONGITUDE,
|
||||
CONF_MONITORED_CONDITIONS,
|
||||
CONF_NAME,
|
||||
SPEED_KILOMETERS_PER_HOUR,
|
||||
TEMP_CELSIUS,
|
||||
TIME_HOURS,
|
||||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
@@ -59,7 +59,7 @@ SENSOR_TYPES = {
|
||||
"cloud_type_id": ["Cloud Type ID", None],
|
||||
"cloud_type": ["Cloud Type", None],
|
||||
"delta_t": ["Delta Temp C", TEMP_CELSIUS],
|
||||
"gust_kmh": ["Wind Gust kmh", f"km/{TIME_HOURS}"],
|
||||
"gust_kmh": ["Wind Gust kmh", SPEED_KILOMETERS_PER_HOUR],
|
||||
"gust_kt": ["Wind Gust kt", "kt"],
|
||||
"air_temp": ["Air Temp C", TEMP_CELSIUS],
|
||||
"dewpt": ["Dew Point C", TEMP_CELSIUS],
|
||||
@@ -76,7 +76,7 @@ SENSOR_TYPES = {
|
||||
"vis_km": ["Visability km", "km"],
|
||||
"weather": ["Weather", None],
|
||||
"wind_dir": ["Wind Direction", None],
|
||||
"wind_spd_kmh": ["Wind Speed kmh", f"km/{TIME_HOURS}"],
|
||||
"wind_spd_kmh": ["Wind Speed kmh", SPEED_KILOMETERS_PER_HOUR],
|
||||
"wind_spd_kt": ["Wind Speed kt", "kt"],
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user