Migrate Ambiclimate to use has entity name (#96561)
parent
499c7491af
commit
0ff8371953
|
@ -154,17 +154,18 @@ class AmbiclimateEntity(ClimateEntity):
|
||||||
_attr_target_temperature_step = 1
|
_attr_target_temperature_step = 1
|
||||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||||
_attr_hvac_modes = [HVACMode.HEAT, HVACMode.OFF]
|
_attr_hvac_modes = [HVACMode.HEAT, HVACMode.OFF]
|
||||||
|
_attr_has_entity_name = True
|
||||||
|
_attr_name = None
|
||||||
|
|
||||||
def __init__(self, heater, store):
|
def __init__(self, heater, store):
|
||||||
"""Initialize the thermostat."""
|
"""Initialize the thermostat."""
|
||||||
self._heater = heater
|
self._heater = heater
|
||||||
self._store = store
|
self._store = store
|
||||||
self._attr_unique_id = heater.device_id
|
self._attr_unique_id = heater.device_id
|
||||||
self._attr_name = heater.name
|
|
||||||
self._attr_device_info = DeviceInfo(
|
self._attr_device_info = DeviceInfo(
|
||||||
identifiers={(DOMAIN, self.unique_id)},
|
identifiers={(DOMAIN, self.unique_id)},
|
||||||
manufacturer="Ambiclimate",
|
manufacturer="Ambiclimate",
|
||||||
name=self.name,
|
name=heater.name,
|
||||||
)
|
)
|
||||||
|
|
||||||
async def async_set_temperature(self, **kwargs: Any) -> None:
|
async def async_set_temperature(self, **kwargs: Any) -> None:
|
||||||
|
|
Loading…
Reference in New Issue