Drop UNIT_ prefix for percentage constant (#39383)

This commit is contained in:
springstan 2020-09-05 21:09:14 +02:00 committed by GitHub
parent cdc93d7110
commit d2b1918e9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
183 changed files with 639 additions and 661 deletions

View file

@ -14,7 +14,7 @@ from homeassistant.const import (
CONF_NAME,
DATA_GIGABYTES,
HTTP_OK,
UNIT_PERCENTAGE,
PERCENTAGE,
)
from homeassistant.helpers.aiohttp_client import async_get_clientsession
import homeassistant.helpers.config_validation as cv
@ -30,7 +30,7 @@ MIN_TIME_BETWEEN_UPDATES = timedelta(hours=1)
REQUEST_TIMEOUT = 5 # seconds
SENSOR_TYPES = {
"usage": ["Usage Ratio", UNIT_PERCENTAGE, "mdi:percent"],
"usage": ["Usage Ratio", PERCENTAGE, "mdi:percent"],
"usage_gb": ["Usage", DATA_GIGABYTES, "mdi:download"],
"limit": ["Data limit", DATA_GIGABYTES, "mdi:download"],
"used_download": ["Used Download", DATA_GIGABYTES, "mdi:download"],