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

@ -13,7 +13,7 @@ from homeassistant.const import (
CONF_PORT,
TEMP_CELSIUS,
UNIT_PERCENTAGE,
UNIT_VOLT,
VOLT,
)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
@ -81,9 +81,9 @@ SENSOR_TYPES = {
"counter_a": ["counter", "count"],
"counter_b": ["counter", "count"],
"HobbyBoard": ["none", "none"],
"voltage": ["voltage", UNIT_VOLT],
"voltage_VAD": ["voltage", UNIT_VOLT],
"voltage_VDD": ["voltage", UNIT_VOLT],
"voltage": ["voltage", VOLT],
"voltage_VAD": ["voltage", VOLT],
"voltage_VDD": ["voltage", VOLT],
"current": ["current", "A"],
}