mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Use shorthand attributes in Lyric (#99593)
This commit is contained in:
parent
3b6811dab6
commit
cab0bde37b
@ -139,6 +139,13 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
|
|||||||
entity_description: ClimateEntityDescription
|
entity_description: ClimateEntityDescription
|
||||||
|
|
||||||
_attr_name = None
|
_attr_name = None
|
||||||
|
_attr_preset_modes = [
|
||||||
|
PRESET_NO_HOLD,
|
||||||
|
PRESET_HOLD_UNTIL,
|
||||||
|
PRESET_PERMANENT_HOLD,
|
||||||
|
PRESET_TEMPORARY_HOLD,
|
||||||
|
PRESET_VACATION_HOLD,
|
||||||
|
]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -245,17 +252,6 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
|
|||||||
"""Return current preset mode."""
|
"""Return current preset mode."""
|
||||||
return self.device.changeableValues.thermostatSetpointStatus
|
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
|
@property
|
||||||
def min_temp(self) -> float:
|
def min_temp(self) -> float:
|
||||||
"""Identify min_temp in Lyric API or defaults if not available."""
|
"""Identify min_temp in Lyric API or defaults if not available."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user