Migrate NuHeat to has entity name (#96742)

This commit is contained in:
Joost Lekkerkerker 2023-07-17 12:09:43 +02:00 committed by GitHub
parent 5a951c390b
commit dc8267b05a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,6 +75,8 @@ class NuHeatThermostat(CoordinatorEntity, ClimateEntity):
_attr_supported_features = (
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
)
_attr_has_entity_name = True
_attr_name = None
def __init__(self, coordinator, thermostat, temperature_unit):
"""Initialize the thermostat."""
@ -84,11 +86,6 @@ class NuHeatThermostat(CoordinatorEntity, ClimateEntity):
self._schedule_mode = None
self._target_temperature = None
@property
def name(self):
"""Return the name of the thermostat."""
return self._thermostat.room
@property
def temperature_unit(self) -> str:
"""Return the unit of measurement."""