Use shorthand attributes in Lyric (#99593)

pull/99585/head^2
Joost Lekkerkerker 2023-09-04 15:05:33 +02:00 committed by GitHub
parent 3b6811dab6
commit cab0bde37b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 11 deletions

View File

@ -139,6 +139,13 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
entity_description: ClimateEntityDescription
_attr_name = None
_attr_preset_modes = [
PRESET_NO_HOLD,
PRESET_HOLD_UNTIL,
PRESET_PERMANENT_HOLD,
PRESET_TEMPORARY_HOLD,
PRESET_VACATION_HOLD,
]
def __init__(
self,
@ -245,17 +252,6 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
"""Return current preset mode."""
return self.device.changeableValues.thermostatSetpointStatus
@property
def preset_modes(self) -> list[str] | None:
"""Return preset modes."""
return [
PRESET_NO_HOLD,
PRESET_HOLD_UNTIL,
PRESET_PERMANENT_HOLD,
PRESET_TEMPORARY_HOLD,
PRESET_VACATION_HOLD,
]
@property
def min_temp(self) -> float:
"""Identify min_temp in Lyric API or defaults if not available."""