Add and use percentage constant (#32094)

* Add and use percentage constant

* Fix pylint error and broken test
This commit is contained in:
springstan authored and GitHub committed 2020-02-28 11:46:48 -08:00
1 parent c7f128f286
commit f1a0ca7cd3
155 files changed
+735 -459

No files matched your search

+16 -15
View File
@@ -19,6 +19,7 @@ from homeassistant.const import (
SPEED_METERS_PER_SECOND,
SPEED_MILES_PER_HOUR,
TIME_HOURS,
UNIT_PERCENTAGE,
UNIT_UV_INDEX,
)
import homeassistant.helpers.config_validation as cv
@@ -113,11 +114,11 @@ SENSOR_TYPES = {
],
"precip_probability": [
"Precip Probability",
"%",
"%",
"%",
"%",
"%",
UNIT_PERCENTAGE,
UNIT_PERCENTAGE,
UNIT_PERCENTAGE,
UNIT_PERCENTAGE,
UNIT_PERCENTAGE,
"mdi:water-percent",
["currently", "minutely", "hourly", "daily"],
],
@@ -193,21 +194,21 @@ SENSOR_TYPES = {
],
"cloud_cover": [
"Cloud Coverage",
"%",
"%",
"%",
"%",
"%",
UNIT_PERCENTAGE,
UNIT_PERCENTAGE,
UNIT_PERCENTAGE,
UNIT_PERCENTAGE,
UNIT_PERCENTAGE,
"mdi:weather-partly-cloudy",
["currently", "hourly", "daily"],
],
"humidity": [
"Humidity",
"%",
"%",
"%",
"%",
"%",
UNIT_PERCENTAGE,
UNIT_PERCENTAGE,
UNIT_PERCENTAGE,
UNIT_PERCENTAGE,
UNIT_PERCENTAGE,
"mdi:water-percent",
["currently", "hourly", "daily"],
],