mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix Lyric temperature setting when off (#68573)
This commit is contained in:
parent
76103752b8
commit
46072d2997
@ -211,29 +211,35 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
|
|||||||
"""Return the temperature we try to reach."""
|
"""Return the temperature we try to reach."""
|
||||||
device = self.device
|
device = self.device
|
||||||
if (
|
if (
|
||||||
not device.changeableValues.autoChangeoverActive
|
device.changeableValues.autoChangeoverActive
|
||||||
and HVAC_MODES[device.changeableValues.mode] != HVAC_MODE_OFF
|
or HVAC_MODES[device.changeableValues.mode] == HVAC_MODE_OFF
|
||||||
):
|
):
|
||||||
if self.hvac_mode == HVAC_MODE_COOL:
|
return None
|
||||||
return device.changeableValues.coolSetpoint
|
if self.hvac_mode == HVAC_MODE_COOL:
|
||||||
return device.changeableValues.heatSetpoint
|
return device.changeableValues.coolSetpoint
|
||||||
return None
|
return device.changeableValues.heatSetpoint
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def target_temperature_high(self) -> float | None:
|
def target_temperature_high(self) -> float | None:
|
||||||
"""Return the highbound target temperature we try to reach."""
|
"""Return the highbound target temperature we try to reach."""
|
||||||
device = self.device
|
device = self.device
|
||||||
if device.changeableValues.autoChangeoverActive:
|
if (
|
||||||
return device.changeableValues.coolSetpoint
|
not device.changeableValues.autoChangeoverActive
|
||||||
return None
|
or HVAC_MODES[device.changeableValues.mode] == HVAC_MODE_OFF
|
||||||
|
):
|
||||||
|
return None
|
||||||
|
return device.changeableValues.coolSetpoint
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def target_temperature_low(self) -> float | None:
|
def target_temperature_low(self) -> float | None:
|
||||||
"""Return the lowbound target temperature we try to reach."""
|
"""Return the lowbound target temperature we try to reach."""
|
||||||
device = self.device
|
device = self.device
|
||||||
if device.changeableValues.autoChangeoverActive:
|
if (
|
||||||
return device.changeableValues.heatSetpoint
|
not device.changeableValues.autoChangeoverActive
|
||||||
return None
|
or HVAC_MODES[device.changeableValues.mode] == HVAC_MODE_OFF
|
||||||
|
):
|
||||||
|
return None
|
||||||
|
return device.changeableValues.heatSetpoint
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def preset_mode(self) -> str | None:
|
def preset_mode(self) -> str | None:
|
||||||
@ -269,6 +275,9 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
|
|||||||
|
|
||||||
async def async_set_temperature(self, **kwargs) -> None:
|
async def async_set_temperature(self, **kwargs) -> None:
|
||||||
"""Set new target temperature."""
|
"""Set new target temperature."""
|
||||||
|
if self.hvac_mode == HVAC_MODE_OFF:
|
||||||
|
return
|
||||||
|
|
||||||
device = self.device
|
device = self.device
|
||||||
target_temp_low = kwargs.get(ATTR_TARGET_TEMP_LOW)
|
target_temp_low = kwargs.get(ATTR_TARGET_TEMP_LOW)
|
||||||
target_temp_high = kwargs.get(ATTR_TARGET_TEMP_HIGH)
|
target_temp_high = kwargs.get(ATTR_TARGET_TEMP_HIGH)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user