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

@ -8,10 +8,10 @@ from homeassistant.const import (
ELECTRICAL_CURRENT_AMPERE,
ELECTRICAL_VOLT_AMPERE,
FREQUENCY_HERTZ,
PERCENTAGE,
POWER_WATT,
TEMP_CELSIUS,
TIME_SECONDS,
UNIT_PERCENTAGE,
VOLT,
)
@ -48,8 +48,8 @@ SENSOR_TYPES = {
"mdi:thermometer",
DEVICE_CLASS_TEMPERATURE,
],
"ups.load": ["Load", UNIT_PERCENTAGE, "mdi:gauge", None],
"ups.load.high": ["Overload Setting", UNIT_PERCENTAGE, "mdi:gauge", None],
"ups.load": ["Load", PERCENTAGE, "mdi:gauge", None],
"ups.load.high": ["Overload Setting", PERCENTAGE, "mdi:gauge", None],
"ups.id": ["System identifier", "", "mdi:information-outline", None],
"ups.delay.start": ["Load Restart Delay", TIME_SECONDS, "mdi:timer-outline", None],
"ups.delay.reboot": ["UPS Reboot Delay", TIME_SECONDS, "mdi:timer-outline", None],
@ -77,7 +77,7 @@ SENSOR_TYPES = {
"ups.test.date": ["Self-Test Date", "", "mdi:calendar", None],
"ups.display.language": ["Language", "", "mdi:information-outline", None],
"ups.contacts": ["External Contacts", "", "mdi:information-outline", None],
"ups.efficiency": ["Efficiency", UNIT_PERCENTAGE, "mdi:gauge", None],
"ups.efficiency": ["Efficiency", PERCENTAGE, "mdi:gauge", None],
"ups.power": ["Current Apparent Power", ELECTRICAL_VOLT_AMPERE, "mdi:flash", None],
"ups.power.nominal": ["Nominal Power", ELECTRICAL_VOLT_AMPERE, "mdi:flash", None],
"ups.realpower": [
@ -101,20 +101,20 @@ SENSOR_TYPES = {
"ups.shutdown": ["Shutdown Ability", "", "mdi:information-outline", None],
"battery.charge": [
"Battery Charge",
UNIT_PERCENTAGE,
PERCENTAGE,
"mdi:gauge",
DEVICE_CLASS_BATTERY,
],
"battery.charge.low": ["Low Battery Setpoint", UNIT_PERCENTAGE, "mdi:gauge", None],
"battery.charge.low": ["Low Battery Setpoint", PERCENTAGE, "mdi:gauge", None],
"battery.charge.restart": [
"Minimum Battery to Start",
UNIT_PERCENTAGE,
PERCENTAGE,
"mdi:gauge",
None,
],
"battery.charge.warning": [
"Warning Battery Setpoint",
UNIT_PERCENTAGE,
PERCENTAGE,
"mdi:gauge",
None,
],