|
45 | 45 | # general ac attributes
|
46 | 46 | ATTR_FRIDGE = "fridge"
|
47 | 47 | ATTR_FREEZER = "freezer"
|
| 48 | +ATTR_SWING_HORIZONTAL = "swing_mode_horizontal" |
| 49 | +ATTR_SWING_VERTICAL = "swing_mode_vertical" |
| 50 | +HVAC_MODE_NONE = "--" |
| 51 | +SWING_PREFIX = ["Vertical", "Horizontal"] |
48 | 52 |
|
49 | 53 | # service definitions
|
50 | 54 | SERVICE_SET_SLEEP_TIME = "set_sleep_time"
|
|
72 | 76 | ACMode.ENERGY_SAVER.name: {"preset": PRESET_ECO, "hvac": HVACMode.COOL},
|
73 | 77 | }
|
74 | 78 |
|
75 |
| -HVAC_MODE_NONE = "--" |
76 |
| -ATTR_SWING_HORIZONTAL = "swing_mode_horizontal" |
77 |
| -ATTR_SWING_VERTICAL = "swing_mode_vertical" |
78 |
| -SWING_PREFIX = ["Vertical", "Horizontal"] |
| 79 | +DEFAULT_AC_FEATURES = ( |
| 80 | + ClimateEntityFeature.TARGET_TEMPERATURE |
| 81 | + | ClimateEntityFeature.TURN_OFF |
| 82 | + | ClimateEntityFeature.TURN_ON |
| 83 | +) |
79 | 84 |
|
80 | 85 | _LOGGER = logging.getLogger(__name__)
|
81 | 86 |
|
@@ -174,6 +179,8 @@ def _async_discover_device(lge_devices: dict) -> None:
|
174 | 179 | class LGEClimate(CoordinatorEntity, ClimateEntity):
|
175 | 180 | """Base climate device."""
|
176 | 181 |
|
| 182 | + _enable_turn_on_off_backwards_compatibility = False |
| 183 | + |
177 | 184 | def __init__(self, api: LGEDevice):
|
178 | 185 | """Initialize the climate."""
|
179 | 186 | super().__init__(api.coordinator)
|
@@ -259,7 +266,7 @@ def _get_swing_mode(self, hor_mode=False) -> str | None:
|
259 | 266 | @property
|
260 | 267 | def supported_features(self) -> ClimateEntityFeature:
|
261 | 268 | """Return the list of supported features."""
|
262 |
| - features = ClimateEntityFeature.TARGET_TEMPERATURE |
| 269 | + features = DEFAULT_AC_FEATURES |
263 | 270 | if len(self.fan_modes) > 0:
|
264 | 271 | features |= ClimateEntityFeature.FAN_MODE
|
265 | 272 | if self.preset_modes:
|
|
0 commit comments