mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Migrate NuHeat to has entity name (#96742)
This commit is contained in:
parent
5a951c390b
commit
dc8267b05a
@ -75,6 +75,8 @@ class NuHeatThermostat(CoordinatorEntity, ClimateEntity):
|
|||||||
_attr_supported_features = (
|
_attr_supported_features = (
|
||||||
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
|
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
|
||||||
)
|
)
|
||||||
|
_attr_has_entity_name = True
|
||||||
|
_attr_name = None
|
||||||
|
|
||||||
def __init__(self, coordinator, thermostat, temperature_unit):
|
def __init__(self, coordinator, thermostat, temperature_unit):
|
||||||
"""Initialize the thermostat."""
|
"""Initialize the thermostat."""
|
||||||
@ -84,11 +86,6 @@ class NuHeatThermostat(CoordinatorEntity, ClimateEntity):
|
|||||||
self._schedule_mode = None
|
self._schedule_mode = None
|
||||||
self._target_temperature = None
|
self._target_temperature = None
|
||||||
|
|
||||||
@property
|
|
||||||
def name(self):
|
|
||||||
"""Return the name of the thermostat."""
|
|
||||||
return self._thermostat.room
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def temperature_unit(self) -> str:
|
def temperature_unit(self) -> str:
|
||||||
"""Return the unit of measurement."""
|
"""Return the unit of measurement."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user