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:
1 parent
fbde040f59
commit
ef9d9b17bd
42 files changed
+170
-196
No files matched your search
@@ -3,11 +3,11 @@ from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from homeassistant.const import (
|
||||
DEGREE,
|
||||
ENERGY_KILO_WATT_HOUR,
|
||||
POWER_WATT,
|
||||
UNIT_DEGREE,
|
||||
UNIT_PERCENTAGE,
|
||||
UNIT_VOLT,
|
||||
VOLT,
|
||||
VOLUME_CUBIC_METERS,
|
||||
)
|
||||
from homeassistant.helpers.entity import Entity
|
||||
@@ -27,7 +27,7 @@ SENSOR_TYPES = {
|
||||
"active_power",
|
||||
],
|
||||
"current": ["Current", "mdi:gauge", "local", "A", "current"],
|
||||
"voltage": ["Voltage", "mdi:gauge", "local", UNIT_VOLT, "voltage"],
|
||||
"voltage": ["Voltage", "mdi:gauge", "local", VOLT, "voltage"],
|
||||
"active_cosfi": [
|
||||
"Power Factor",
|
||||
"mdi:gauge",
|
||||
@@ -74,7 +74,7 @@ SENSOR_TYPES = {
|
||||
"Water Sensor Temperature",
|
||||
"mdi:temperature-celsius",
|
||||
"water",
|
||||
UNIT_DEGREE,
|
||||
DEGREE,
|
||||
"temperature",
|
||||
],
|
||||
"water_sensor_humidity": [
|
||||
|
||||
Reference in new issue
Block a user