Use common percentage const at Home Connect (#144021)

This commit is contained in:
J. Diego Rodríguez Royo 2025-05-01 09:57:42 +02:00 committed by GitHub
parent f441f4d7c0
commit 17360ede28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,6 +11,7 @@ from homeassistant.components.number import (
NumberEntity, NumberEntity,
NumberEntityDescription, NumberEntityDescription,
) )
from homeassistant.const import PERCENTAGE
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
@ -79,7 +80,7 @@ NUMBERS = (
NumberEntityDescription( NumberEntityDescription(
key=SettingKey.COOKING_HOOD_COLOR_TEMPERATURE_PERCENT, key=SettingKey.COOKING_HOOD_COLOR_TEMPERATURE_PERCENT,
translation_key="color_temperature_percent", translation_key="color_temperature_percent",
native_unit_of_measurement="%", native_unit_of_measurement=PERCENTAGE,
), ),
NumberEntityDescription( NumberEntityDescription(
key=SettingKey.LAUNDRY_CARE_WASHER_I_DOS_1_BASE_LEVEL, key=SettingKey.LAUNDRY_CARE_WASHER_I_DOS_1_BASE_LEVEL,