From 00cc57c4ed102b2d1fd1b081be748970a31cec4e Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 28 Aug 2023 17:57:51 +0200 Subject: [PATCH] Use shorthand attribute for Coolmaster (#99211) --- homeassistant/components/coolmaster/climate.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/homeassistant/components/coolmaster/climate.py b/homeassistant/components/coolmaster/climate.py index 6ae6613bcca..c9f5cff4339 100644 --- a/homeassistant/components/coolmaster/climate.py +++ b/homeassistant/components/coolmaster/climate.py @@ -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."""