Drop UNIT_ prefix for constants (#34164)

* Drop UNIT_ prefix for VOLT

* Drop UNIT_ prefix for DEGREE

* Drop UNIT_ prefix for CONDUCTIVITY

* Drop UNIT_ prefix for UV_INDEX

* Run isort
This commit is contained in:
springstan 2020-04-21 19:45:53 +02:00 committed by GitHub
parent fbde040f59
commit ef9d9b17bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 170 additions and 196 deletions

View file

@ -1,7 +1,7 @@
"""Support for OpenUV sensors."""
import logging
from homeassistant.const import TIME_MINUTES, UNIT_UV_INDEX
from homeassistant.const import TIME_MINUTES, UV_INDEX
from homeassistant.core import callback
from homeassistant.util.dt import as_local, parse_datetime
@ -43,9 +43,9 @@ UV_LEVEL_LOW = "Low"
SENSORS = {
TYPE_CURRENT_OZONE_LEVEL: ("Current Ozone Level", "mdi:vector-triangle", "du"),
TYPE_CURRENT_UV_INDEX: ("Current UV Index", "mdi:weather-sunny", UNIT_UV_INDEX),
TYPE_CURRENT_UV_INDEX: ("Current UV Index", "mdi:weather-sunny", UV_INDEX),
TYPE_CURRENT_UV_LEVEL: ("Current UV Level", "mdi:weather-sunny", None),
TYPE_MAX_UV_INDEX: ("Max UV Index", "mdi:weather-sunny", UNIT_UV_INDEX),
TYPE_MAX_UV_INDEX: ("Max UV Index", "mdi:weather-sunny", UV_INDEX),
TYPE_SAFE_EXPOSURE_TIME_1: (
"Skin Type 1 Safe Exposure Time",
"mdi:timer",