Drop UNIT_ prefix for percentage constant (#39383)

This commit is contained in:
springstan authored and GitHub committed 2020-09-05 21:09:14 +02:00
1 parent cdc93d7110
commit d2b1918e9c
183 files changed
+639 -661

No files matched your search

+3 -3
View File
@@ -22,10 +22,10 @@ from homeassistant.const import (
DEVICE_CLASS_PRESSURE,
DEVICE_CLASS_TEMPERATURE,
ENERGY_KILO_WATT_HOUR,
PERCENTAGE,
POWER_WATT,
PRESSURE_HPA,
TEMP_CELSIUS,
UNIT_PERCENTAGE,
)
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import (
@@ -59,7 +59,7 @@ ICON = {
UNIT_OF_MEASUREMENT = {
Consumption: ENERGY_KILO_WATT_HOUR,
Humidity: UNIT_PERCENTAGE,
Humidity: PERCENTAGE,
LightLevel: "lx",
Power: POWER_WATT,
Pressure: PRESSURE_HPA,
@@ -234,7 +234,7 @@ class DeconzBattery(DeconzDevice):
@property
def unit_of_measurement(self):
"""Return the unit of measurement of this entity."""
return UNIT_PERCENTAGE
return PERCENTAGE
@property
def device_state_attributes(self):