Use shorthand attribute for Coolmaster (#99211)
parent
377f7cba60
commit
00cc57c4ed
|
@ -58,12 +58,8 @@ class CoolmasterClimate(CoolmasterEntity, ClimateEntity):
|
|||
def __init__(self, coordinator, unit_id, info, supported_modes):
|
||||
"""Initialize the climate device."""
|
||||
super().__init__(coordinator, unit_id, info)
|
||||
self._hvac_modes = supported_modes
|
||||
|
||||
@property
|
||||
def unique_id(self):
|
||||
"""Return unique ID for this device."""
|
||||
return self._unit_id
|
||||
self._attr_hvac_modes = supported_modes
|
||||
self._attr_unique_id = unit_id
|
||||
|
||||
@property
|
||||
def supported_features(self) -> ClimateEntityFeature:
|
||||
|
@ -102,11 +98,6 @@ class CoolmasterClimate(CoolmasterEntity, ClimateEntity):
|
|||
|
||||
return CM_TO_HA_STATE[mode]
|
||||
|
||||
@property
|
||||
def hvac_modes(self):
|
||||
"""Return the list of available operation modes."""
|
||||
return self._hvac_modes
|
||||
|
||||
@property
|
||||
def fan_mode(self):
|
||||
"""Return the fan setting."""
|
||||
|
|
Loading…
Reference in New Issue