diff --git a/homeassistant/components/airtouch4/climate.py b/homeassistant/components/airtouch4/climate.py index e7d73ec0f1c..52e234505c1 100644 --- a/homeassistant/components/airtouch4/climate.py +++ b/homeassistant/components/airtouch4/climate.py @@ -84,6 +84,9 @@ async def async_setup_entry( class AirtouchAC(CoordinatorEntity, ClimateEntity): """Representation of an AirTouch 4 ac.""" + _attr_has_entity_name = True + _attr_name = None + _attr_supported_features = ( ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE ) @@ -107,7 +110,7 @@ class AirtouchAC(CoordinatorEntity, ClimateEntity): """Return device info for this device.""" return DeviceInfo( identifiers={(DOMAIN, self.unique_id)}, - name=self.name, + name=f"AC {self._ac_number}", manufacturer="Airtouch", model="Airtouch 4", ) @@ -122,11 +125,6 @@ class AirtouchAC(CoordinatorEntity, ClimateEntity): """Return the current temperature.""" return self._unit.Temperature - @property - def name(self): - """Return the name of the climate device.""" - return f"AC {self._ac_number}" - @property def fan_mode(self): """Return fan mode of the AC this group belongs to.""" @@ -200,6 +198,8 @@ class AirtouchAC(CoordinatorEntity, ClimateEntity): class AirtouchGroup(CoordinatorEntity, ClimateEntity): """Representation of an AirTouch 4 group.""" + _attr_has_entity_name = True + _attr_name = None _attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE _attr_temperature_unit = UnitOfTemperature.CELSIUS _attr_hvac_modes = AT_GROUP_MODES @@ -224,7 +224,7 @@ class AirtouchGroup(CoordinatorEntity, ClimateEntity): identifiers={(DOMAIN, self.unique_id)}, manufacturer="Airtouch", model="Airtouch 4", - name=self.name, + name=self._unit.GroupName, ) @property @@ -242,11 +242,6 @@ class AirtouchGroup(CoordinatorEntity, ClimateEntity): """Return Max Temperature for AC of this group.""" return self._airtouch.acs[self._unit.BelongsToAc].MaxSetpoint - @property - def name(self): - """Return the name of the climate device.""" - return self._unit.GroupName - @property def current_temperature(self): """Return the current temperature."""