mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Use device class naming for nobo hub v2 (#96022)
This commit is contained in:
parent
6dae3553f2
commit
e0274ec854
@ -73,6 +73,8 @@ class NoboZone(ClimateEntity):
|
|||||||
controlled as a unity.
|
controlled as a unity.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
_attr_name = None
|
||||||
|
_attr_has_entity_name = True
|
||||||
_attr_max_temp = MAX_TEMPERATURE
|
_attr_max_temp = MAX_TEMPERATURE
|
||||||
_attr_min_temp = MIN_TEMPERATURE
|
_attr_min_temp = MIN_TEMPERATURE
|
||||||
_attr_precision = PRECISION_TENTHS
|
_attr_precision = PRECISION_TENTHS
|
||||||
@ -87,8 +89,6 @@ class NoboZone(ClimateEntity):
|
|||||||
self._id = zone_id
|
self._id = zone_id
|
||||||
self._nobo = hub
|
self._nobo = hub
|
||||||
self._attr_unique_id = f"{hub.hub_serial}:{zone_id}"
|
self._attr_unique_id = f"{hub.hub_serial}:{zone_id}"
|
||||||
self._attr_name = None
|
|
||||||
self._attr_has_entity_name = True
|
|
||||||
self._attr_hvac_mode = HVACMode.AUTO
|
self._attr_hvac_mode = HVACMode.AUTO
|
||||||
self._attr_hvac_modes = [HVACMode.HEAT, HVACMode.AUTO]
|
self._attr_hvac_modes = [HVACMode.HEAT, HVACMode.AUTO]
|
||||||
self._override_type = override_type
|
self._override_type = override_type
|
||||||
|
@ -46,6 +46,7 @@ class NoboTemperatureSensor(SensorEntity):
|
|||||||
_attr_native_unit_of_measurement = UnitOfTemperature.CELSIUS
|
_attr_native_unit_of_measurement = UnitOfTemperature.CELSIUS
|
||||||
_attr_state_class = SensorStateClass.MEASUREMENT
|
_attr_state_class = SensorStateClass.MEASUREMENT
|
||||||
_attr_should_poll = False
|
_attr_should_poll = False
|
||||||
|
_attr_has_entity_name = True
|
||||||
|
|
||||||
def __init__(self, serial: str, hub: nobo) -> None:
|
def __init__(self, serial: str, hub: nobo) -> None:
|
||||||
"""Initialize the temperature sensor."""
|
"""Initialize the temperature sensor."""
|
||||||
@ -54,8 +55,6 @@ class NoboTemperatureSensor(SensorEntity):
|
|||||||
self._nobo = hub
|
self._nobo = hub
|
||||||
component = hub.components[self._id]
|
component = hub.components[self._id]
|
||||||
self._attr_unique_id = component[ATTR_SERIAL]
|
self._attr_unique_id = component[ATTR_SERIAL]
|
||||||
self._attr_name = "Temperature"
|
|
||||||
self._attr_has_entity_name = True
|
|
||||||
zone_id = component[ATTR_ZONE_ID]
|
zone_id = component[ATTR_ZONE_ID]
|
||||||
suggested_area = None
|
suggested_area = None
|
||||||
if zone_id != "-1":
|
if zone_id != "-1":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user