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:
parent
fbde040f59
commit
ef9d9b17bd
42 changed files with 170 additions and 196 deletions
|
@ -6,7 +6,7 @@ import logging
|
|||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import CONF_DISPLAY_OPTIONS, CONF_NAME, TEMP_CELSIUS, UNIT_VOLT
|
||||
from homeassistant.const import CONF_DISPLAY_OPTIONS, CONF_NAME, TEMP_CELSIUS, VOLT
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.util import Throttle
|
||||
|
@ -31,10 +31,10 @@ SENSOR_TYPES = {
|
|||
"magnetometer_z": ["magnetometer_z", " ", "mdi:magnet"],
|
||||
"temperature": ["temperature", TEMP_CELSIUS, "mdi:thermometer"],
|
||||
"pressure": ["pressure", "hPa", "mdi:gauge"],
|
||||
"voltage_0": ["voltage_0", UNIT_VOLT, "mdi:flash"],
|
||||
"voltage_1": ["voltage_1", UNIT_VOLT, "mdi:flash"],
|
||||
"voltage_2": ["voltage_2", UNIT_VOLT, "mdi:flash"],
|
||||
"voltage_3": ["voltage_3", UNIT_VOLT, "mdi:flash"],
|
||||
"voltage_0": ["voltage_0", VOLT, "mdi:flash"],
|
||||
"voltage_1": ["voltage_1", VOLT, "mdi:flash"],
|
||||
"voltage_2": ["voltage_2", VOLT, "mdi:flash"],
|
||||
"voltage_3": ["voltage_3", VOLT, "mdi:flash"],
|
||||
}
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue