mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
Use shorthand attribute for Coolmaster (#99211)
This commit is contained in:
parent
377f7cba60
commit
00cc57c4ed
@ -58,12 +58,8 @@ class CoolmasterClimate(CoolmasterEntity, ClimateEntity):
|
|||||||
def __init__(self, coordinator, unit_id, info, supported_modes):
|
def __init__(self, coordinator, unit_id, info, supported_modes):
|
||||||
"""Initialize the climate device."""
|
"""Initialize the climate device."""
|
||||||
super().__init__(coordinator, unit_id, info)
|
super().__init__(coordinator, unit_id, info)
|
||||||
self._hvac_modes = supported_modes
|
self._attr_hvac_modes = supported_modes
|
||||||
|
self._attr_unique_id = unit_id
|
||||||
@property
|
|
||||||
def unique_id(self):
|
|
||||||
"""Return unique ID for this device."""
|
|
||||||
return self._unit_id
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_features(self) -> ClimateEntityFeature:
|
def supported_features(self) -> ClimateEntityFeature:
|
||||||
@ -102,11 +98,6 @@ class CoolmasterClimate(CoolmasterEntity, ClimateEntity):
|
|||||||
|
|
||||||
return CM_TO_HA_STATE[mode]
|
return CM_TO_HA_STATE[mode]
|
||||||
|
|
||||||
@property
|
|
||||||
def hvac_modes(self):
|
|
||||||
"""Return the list of available operation modes."""
|
|
||||||
return self._hvac_modes
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def fan_mode(self):
|
def fan_mode(self):
|
||||||
"""Return the fan setting."""
|
"""Return the fan setting."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user