mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fix Lyric HVAC mode reset on temperature change (#104910)
* Fix Lyric HVAC mode reset on temperature change * Reduce code duplication * Revert additional bugfix Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com> --------- Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
This commit is contained in:
parent
833805f9be
commit
23cd66c54b
@ -324,6 +324,15 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
|
||||
"Could not find target_temp_low and/or target_temp_high in"
|
||||
" arguments"
|
||||
)
|
||||
|
||||
# If the device supports "Auto" mode, don't pass the mode when setting the
|
||||
# temperature
|
||||
mode = (
|
||||
None
|
||||
if device.changeableValues.mode == LYRIC_HVAC_MODE_HEAT_COOL
|
||||
else HVAC_MODES[device.changeableValues.heatCoolMode]
|
||||
)
|
||||
|
||||
_LOGGER.debug("Set temperature: %s - %s", target_temp_low, target_temp_high)
|
||||
try:
|
||||
await self._update_thermostat(
|
||||
@ -331,7 +340,7 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
|
||||
device,
|
||||
coolSetpoint=target_temp_high,
|
||||
heatSetpoint=target_temp_low,
|
||||
mode=HVAC_MODES[device.changeableValues.heatCoolMode],
|
||||
mode=mode,
|
||||
)
|
||||
except LYRIC_EXCEPTIONS as exception:
|
||||
_LOGGER.error(exception)
|
||||
|
Loading…
x
Reference in New Issue
Block a user