Skip to content

Commit

Permalink
Add missing translation_key attr to entities
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyroberts committed Nov 14, 2023
1 parent 9c24381 commit 048f037
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions custom_components/wundasmart/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class Device(CoordinatorEntity[WundasmartDataUpdateCoordinator], ClimateEntity):
_attr_hvac_modes = SUPPORTED_HVAC_MODES
_attr_temperature_unit = TEMP_CELSIUS
_attr_preset_modes = SUPPORTED_PRESET_MODES
_attr_translation_key = DOMAIN

def __init__(
self,
Expand Down
2 changes: 2 additions & 0 deletions custom_components/wundasmart/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ async def async_setup_entry(
class Sensor(CoordinatorEntity[WundasmartDataUpdateCoordinator], SensorEntity):
"""Sensor entity for WundaSmart sensor values."""

_attr_translation_key = DOMAIN

def __init__(
self,
wunda_id: str,
Expand Down
14 changes: 7 additions & 7 deletions custom_components/wundasmart/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
},
"entity": {
"climate": {
"wundasmart": {
"state_attributes": {
"preset_mode": {
"state": {
"reduced": "Reduced"
}
}
"wundasmart": {
"state_attributes": {
"preset_mode": {
"state": {
"reduced": "Reduced"
}
}
}
}
}
}
}
3 changes: 1 addition & 2 deletions custom_components/wundasmart/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ class Device(CoordinatorEntity[WundasmartDataUpdateCoordinator], WaterHeaterEnti
OPERATION_BOOST_ON,
OPERATION_BOOST_OFF
]

_attr_supported_features = WaterHeaterEntityFeature.OPERATION_MODE

_attr_temperature_unit = TEMP_CELSIUS
_attr_translation_key = DOMAIN

def __init__(
self,
Expand Down

0 comments on commit 048f037

Please sign in to comment.