diff --git a/homeassistant/components/touchline/climate.py b/homeassistant/components/touchline/climate.py index 3b7f8a84f06..df0afa2ef0d 100644 --- a/homeassistant/components/touchline/climate.py +++ b/homeassistant/components/touchline/climate.py @@ -136,6 +136,8 @@ async def async_setup_platform( class Touchline(ClimateEntity): """Representation of a Touchline device.""" + _attr_has_entity_name = True + _attr_name = None _attr_hvac_mode = HVACMode.HEAT _attr_hvac_modes = [HVACMode.HEAT] _attr_preset_modes = list(PRESET_MODES) @@ -148,13 +150,12 @@ class Touchline(ClimateEntity): def __init__(self, touchline_thermostat): """Initialize the Touchline device.""" self.unit = touchline_thermostat - self._attr_name = self.unit.get_name() self._device_id = self.unit.get_device_id() self._controller_id = self.unit.get_controller_id() self._attr_unique_id = f"{self._controller_id}_{self._device_id}" self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, self._attr_unique_id)}, - name=self._attr_name, + name=touchline_thermostat.get_name(), manufacturer="Roth", ) self._attr_current_temperature = self.unit.get_current_temperature() diff --git a/tests/components/touchline/snapshots/test_climate.ambr b/tests/components/touchline/snapshots/test_climate.ambr index bb1d5edcc60..11cd5402753 100644 --- a/tests/components/touchline/snapshots/test_climate.ambr +++ b/tests/components/touchline/snapshots/test_climate.ambr @@ -28,19 +28,19 @@ 'domain': 'climate', 'entity_category': None, 'entity_id': 'climate.zone_1', - 'has_entity_name': False, + 'has_entity_name': True, 'hidden_by': None, 'icon': None, 'id': , 'labels': set({ }), 'name': None, - 'object_id_base': 'Zone 1', + 'object_id_base': None, 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Zone 1', + 'original_name': None, 'platform': 'touchline', 'previous_unique_id': None, 'suggested_object_id': None,