Add and use percentage constant (#32094)
* Add and use percentage constant * Fix pylint error and broken test
This commit is contained in:
1 parent
c7f128f286
commit
f1a0ca7cd3
155 files changed
+735
-459
No files matched your search
@@ -18,6 +18,5 @@ DEFAULT_MAX_TEMP = 30.0
|
||||
DEFAULT_MIN_TEMP = 6.0
|
||||
|
||||
CURRENCY_EUR = "EUR"
|
||||
RATIO_PERCENT = "%"
|
||||
VOLUME_CM3 = "CM3"
|
||||
VOLUME_M3 = "M3"
|
||||
@@ -2,7 +2,7 @@
|
||||
import logging
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ENERGY_KILO_WATT_HOUR, POWER_WATT
|
||||
from homeassistant.const import ENERGY_KILO_WATT_HOUR, POWER_WATT, UNIT_PERCENTAGE
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
|
||||
from . import (
|
||||
@@ -13,7 +13,7 @@ from . import (
|
||||
ToonGasMeterDeviceEntity,
|
||||
ToonSolarDeviceEntity,
|
||||
)
|
||||
from .const import CURRENCY_EUR, DATA_TOON, DOMAIN, RATIO_PERCENT, VOLUME_CM3, VOLUME_M3
|
||||
from .const import CURRENCY_EUR, DATA_TOON, DOMAIN, VOLUME_CM3, VOLUME_M3
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -195,7 +195,7 @@ async def async_setup_entry(
|
||||
"current_modulation_level",
|
||||
"Boiler Modulation Level",
|
||||
"mdi:percent",
|
||||
RATIO_PERCENT,
|
||||
UNIT_PERCENTAGE,
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user