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