Migrate Ambiclimate to use has entity name (#96561)

pull/96872/head
Joost Lekkerkerker 2023-07-18 20:52:43 +02:00 committed by GitHub
parent 499c7491af
commit 0ff8371953
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -154,17 +154,18 @@ class AmbiclimateEntity(ClimateEntity):
_attr_target_temperature_step = 1
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
_attr_hvac_modes = [HVACMode.HEAT, HVACMode.OFF]
_attr_has_entity_name = True
_attr_name = None
def __init__(self, heater, store):
"""Initialize the thermostat."""
self._heater = heater
self._store = store
self._attr_unique_id = heater.device_id
self._attr_name = heater.name
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, self.unique_id)},
manufacturer="Ambiclimate",
name=self.name,
name=heater.name,
)
async def async_set_temperature(self, **kwargs: Any) -> None: