Drop UNIT_ prefix for percentage constant (#39383)

This commit is contained in:
springstan 2020-09-05 21:09:14 +02:00 committed by GitHub
parent cdc93d7110
commit d2b1918e9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
183 changed files with 639 additions and 661 deletions

View file

@ -30,10 +30,10 @@ from homeassistant.const import (
DEVICE_CLASS_ILLUMINANCE,
DEVICE_CLASS_POWER,
DEVICE_CLASS_TEMPERATURE,
PERCENTAGE,
POWER_WATT,
SPEED_KILOMETERS_PER_HOUR,
TEMP_CELSIUS,
UNIT_PERCENTAGE,
)
from homeassistant.helpers.typing import HomeAssistantType
@ -156,7 +156,7 @@ class HomematicipAccesspointStatus(HomematicipGenericEntity):
@property
def unit_of_measurement(self) -> str:
"""Return the unit this state is expressed in."""
return UNIT_PERCENTAGE
return PERCENTAGE
@property
def device_state_attributes(self) -> Dict[str, Any]:
@ -195,7 +195,7 @@ class HomematicipHeatingThermostat(HomematicipGenericEntity):
@property
def unit_of_measurement(self) -> str:
"""Return the unit this state is expressed in."""
return UNIT_PERCENTAGE
return PERCENTAGE
class HomematicipHumiditySensor(HomematicipGenericEntity):
@ -218,7 +218,7 @@ class HomematicipHumiditySensor(HomematicipGenericEntity):
@property
def unit_of_measurement(self) -> str:
"""Return the unit this state is expressed in."""
return UNIT_PERCENTAGE
return PERCENTAGE
class HomematicipTemperatureSensor(HomematicipGenericEntity):