diff --git a/homeassistant/components/coolmaster/binary_sensor.py b/homeassistant/components/coolmaster/binary_sensor.py index 884cf98b742..29fd5797124 100644 --- a/homeassistant/components/coolmaster/binary_sensor.py +++ b/homeassistant/components/coolmaster/binary_sensor.py @@ -32,12 +32,11 @@ async def async_setup_entry( class CoolmasterCleanFilter(CoolmasterEntity, BinarySensorEntity): """Representation of a unit's filter state (true means need to be cleaned).""" - _attr_has_entity_name = True entity_description = BinarySensorEntityDescription( key="clean_filter", + translation_key="clean_filter", device_class=BinarySensorDeviceClass.PROBLEM, entity_category=EntityCategory.DIAGNOSTIC, - name="Clean filter", icon="mdi:air-filter", ) diff --git a/homeassistant/components/coolmaster/button.py b/homeassistant/components/coolmaster/button.py index a32a9833dd9..e4dfb371a0b 100644 --- a/homeassistant/components/coolmaster/button.py +++ b/homeassistant/components/coolmaster/button.py @@ -28,11 +28,10 @@ async def async_setup_entry( class CoolmasterResetFilter(CoolmasterEntity, ButtonEntity): """Reset the clean filter timer (once filter was cleaned).""" - _attr_has_entity_name = True entity_description = ButtonEntityDescription( key="reset_filter", + translation_key="reset_filter", entity_category=EntityCategory.CONFIG, - name="Reset filter", icon="mdi:air-filter", ) diff --git a/homeassistant/components/coolmaster/climate.py b/homeassistant/components/coolmaster/climate.py index d27f776c655..6ae6613bcca 100644 --- a/homeassistant/components/coolmaster/climate.py +++ b/homeassistant/components/coolmaster/climate.py @@ -53,6 +53,8 @@ async def async_setup_entry( class CoolmasterClimate(CoolmasterEntity, ClimateEntity): """Representation of a coolmaster climate device.""" + _attr_name = None + def __init__(self, coordinator, unit_id, info, supported_modes): """Initialize the climate device.""" super().__init__(coordinator, unit_id, info) @@ -63,11 +65,6 @@ class CoolmasterClimate(CoolmasterEntity, ClimateEntity): """Return unique ID for this device.""" return self._unit_id - @property - def name(self): - """Return the name of the climate device.""" - return self.unique_id - @property def supported_features(self) -> ClimateEntityFeature: """Return the list of supported features.""" diff --git a/homeassistant/components/coolmaster/entity.py b/homeassistant/components/coolmaster/entity.py index 65f21b77534..1607e220a55 100644 --- a/homeassistant/components/coolmaster/entity.py +++ b/homeassistant/components/coolmaster/entity.py @@ -12,6 +12,8 @@ from .const import DOMAIN class CoolmasterEntity(CoordinatorEntity[CoolmasterDataUpdateCoordinator]): """Representation of a Coolmaster entity.""" + _attr_has_entity_name = True + def __init__( self, coordinator: CoolmasterDataUpdateCoordinator, diff --git a/homeassistant/components/coolmaster/sensor.py b/homeassistant/components/coolmaster/sensor.py index 59b0e71abb2..5c6774e8c92 100644 --- a/homeassistant/components/coolmaster/sensor.py +++ b/homeassistant/components/coolmaster/sensor.py @@ -28,11 +28,10 @@ async def async_setup_entry( class CoolmasterCleanFilter(CoolmasterEntity, SensorEntity): """Representation of a unit's error code.""" - _attr_has_entity_name = True entity_description = SensorEntityDescription( key="error_code", + translation_key="error_code", entity_category=EntityCategory.DIAGNOSTIC, - name="Error code", icon="mdi:alert", ) diff --git a/homeassistant/components/coolmaster/strings.json b/homeassistant/components/coolmaster/strings.json index 6bba26b6bc9..7baa6444c1d 100644 --- a/homeassistant/components/coolmaster/strings.json +++ b/homeassistant/components/coolmaster/strings.json @@ -19,5 +19,22 @@ "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]", "no_units": "Could not find any HVAC units in CoolMasterNet host." } + }, + "entity": { + "binary_sensor": { + "clean_filter": { + "name": "Clean filter" + } + }, + "button": { + "reset_filter": { + "name": "Reset filter" + } + }, + "sensor": { + "error_code": { + "name": "Error code" + } + } } }