Use UNIT_UV_INDEX constant (#34055)

This commit is contained in:
springstan authored and GitHub committed 2020-04-12 21:04:13 +02:00
1 parent 138470d86c
commit 44afffcfbf
4 files changed
+9 -6

No files matched your search

+2 -1
View File
@@ -17,6 +17,7 @@ from homeassistant.const import (
SPEED_MILES_PER_HOUR,
TEMP_CELSIUS,
UNIT_PERCENTAGE,
UNIT_UV_INDEX,
)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
@@ -72,7 +73,7 @@ SENSOR_TYPES = {
"wind_gust": ["Wind Gust", SPEED_MILES_PER_HOUR],
"visibility": ["Visibility", None],
"visibility_distance": ["Visibility Distance", LENGTH_KILOMETERS],
"uv": ["UV", None],
"uv": ["UV", UNIT_UV_INDEX],
"precipitation": ["Probability of Precipitation", UNIT_PERCENTAGE],
"humidity": ["Humidity", UNIT_PERCENTAGE],
}