Add and use UNIT_DEGREE constant (#33978)
* Add and use UNIT_DEGREE constant * Replace more occurrences * Add and use TEMP_KELVIN * Run isort
This commit is contained in:
parent
c18a6d5ea3
commit
b893150154
19 changed files with 67 additions and 47 deletions
|
@ -24,6 +24,7 @@ from homeassistant.const import (
|
|||
PRESSURE_HPA,
|
||||
SPEED_METERS_PER_SECOND,
|
||||
TEMP_CELSIUS,
|
||||
UNIT_DEGREE,
|
||||
UNIT_PERCENTAGE,
|
||||
)
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
|
@ -47,7 +48,7 @@ SENSOR_TYPES = {
|
|||
"windSpeed": ["Wind speed", SPEED_METERS_PER_SECOND, None],
|
||||
"windGust": ["Wind gust", SPEED_METERS_PER_SECOND, None],
|
||||
"pressure": ["Pressure", PRESSURE_HPA, DEVICE_CLASS_PRESSURE],
|
||||
"windDirection": ["Wind direction", "°", None],
|
||||
"windDirection": ["Wind direction", UNIT_DEGREE, None],
|
||||
"humidity": ["Humidity", UNIT_PERCENTAGE, DEVICE_CLASS_HUMIDITY],
|
||||
"fog": ["Fog", UNIT_PERCENTAGE, None],
|
||||
"cloudiness": ["Cloudiness", UNIT_PERCENTAGE, None],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue