mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Add entity translations to Whirlpool (#96823)
This commit is contained in:
parent
1a9e27cdaf
commit
8b5bdf9e2f
@ -93,6 +93,7 @@ class AirConEntity(ClimateEntity):
|
||||
|
||||
_attr_fan_modes = SUPPORTED_FAN_MODES
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_hvac_modes = SUPPORTED_HVAC_MODES
|
||||
_attr_max_temp = SUPPORTED_MAX_TEMP
|
||||
_attr_min_temp = SUPPORTED_MIN_TEMP
|
||||
|
@ -105,7 +105,6 @@ class WhirlpoolSensorEntityDescription(
|
||||
SENSORS: tuple[WhirlpoolSensorEntityDescription, ...] = (
|
||||
WhirlpoolSensorEntityDescription(
|
||||
key="state",
|
||||
name="State",
|
||||
translation_key="whirlpool_machine",
|
||||
device_class=SensorDeviceClass.ENUM,
|
||||
options=(
|
||||
@ -117,7 +116,6 @@ SENSORS: tuple[WhirlpoolSensorEntityDescription, ...] = (
|
||||
),
|
||||
WhirlpoolSensorEntityDescription(
|
||||
key="DispenseLevel",
|
||||
name="Detergent Level",
|
||||
translation_key="whirlpool_tank",
|
||||
entity_registry_enabled_default=False,
|
||||
device_class=SensorDeviceClass.ENUM,
|
||||
@ -131,7 +129,7 @@ SENSORS: tuple[WhirlpoolSensorEntityDescription, ...] = (
|
||||
SENSOR_TIMER: tuple[SensorEntityDescription] = (
|
||||
SensorEntityDescription(
|
||||
key="timeremaining",
|
||||
name="End Time",
|
||||
translation_key="end_time",
|
||||
device_class=SensorDeviceClass.TIMESTAMP,
|
||||
),
|
||||
)
|
||||
@ -183,6 +181,7 @@ class WasherDryerClass(SensorEntity):
|
||||
"""A class for the whirlpool/maytag washer account."""
|
||||
|
||||
_attr_should_poll = False
|
||||
_attr_has_entity_name = True
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@ -205,7 +204,6 @@ class WasherDryerClass(SensorEntity):
|
||||
name=name.capitalize(),
|
||||
manufacturer="Whirlpool",
|
||||
)
|
||||
self._attr_has_entity_name = True
|
||||
self._attr_unique_id = f"{said}-{description.key}"
|
||||
|
||||
async def async_added_to_hass(self) -> None:
|
||||
@ -231,6 +229,7 @@ class WasherDryerTimeClass(RestoreSensor):
|
||||
"""A timestamp class for the whirlpool/maytag washer account."""
|
||||
|
||||
_attr_should_poll = False
|
||||
_attr_has_entity_name = True
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@ -254,7 +253,6 @@ class WasherDryerTimeClass(RestoreSensor):
|
||||
name=name.capitalize(),
|
||||
manufacturer="Whirlpool",
|
||||
)
|
||||
self._attr_has_entity_name = True
|
||||
self._attr_unique_id = f"{said}-{description.key}"
|
||||
|
||||
async def async_added_to_hass(self) -> None:
|
||||
|
@ -21,6 +21,7 @@
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"whirlpool_machine": {
|
||||
"name": "State",
|
||||
"state": {
|
||||
"standby": "[%key:common::state::standby%]",
|
||||
"setting": "Setting",
|
||||
@ -51,6 +52,7 @@
|
||||
}
|
||||
},
|
||||
"whirlpool_tank": {
|
||||
"name": "Detergent level",
|
||||
"state": {
|
||||
"unknown": "Unknown",
|
||||
"empty": "Empty",
|
||||
@ -59,6 +61,9 @@
|
||||
"100": "100%",
|
||||
"active": "[%key:common::state::active%]"
|
||||
}
|
||||
},
|
||||
"end_time": {
|
||||
"name": "End time"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user