Add and use percentage constant (#32094)
* Add and use percentage constant * Fix pylint error and broken test
This commit is contained in:
1 parent
c7f128f286
commit
f1a0ca7cd3
155 files changed
+735
-459
No files matched your search
@@ -15,6 +15,7 @@ from homeassistant.const import (
|
||||
CONF_NAME,
|
||||
SPEED_MILES_PER_HOUR,
|
||||
TEMP_CELSIUS,
|
||||
UNIT_PERCENTAGE,
|
||||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
@@ -71,8 +72,8 @@ SENSOR_TYPES = {
|
||||
"visibility": ["Visibility", None],
|
||||
"visibility_distance": ["Visibility Distance", "km"],
|
||||
"uv": ["UV", None],
|
||||
"precipitation": ["Probability of Precipitation", "%"],
|
||||
"humidity": ["Humidity", "%"],
|
||||
"precipitation": ["Probability of Precipitation", UNIT_PERCENTAGE],
|
||||
"humidity": ["Humidity", UNIT_PERCENTAGE],
|
||||
}
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
||||
Reference in new issue
Block a user