mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Fix Lyric cool mode (#54856)
* fixing Cool mode in lyric * Use climate integration constants I believe this fixes this issue: https://github.com/home-assistant/core/pull/51760#discussion_r650372737 * Run through black * Delint Co-authored-by: Yadu Raghu <yraghu55@gmail.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
e5f914bbdb
commit
2ac0aea765
@ -190,6 +190,8 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
|
||||
"""Return the temperature we try to reach."""
|
||||
device = self.device
|
||||
if not device.hasDualSetpointStatus:
|
||||
if self.hvac_mode == HVAC_MODE_COOL:
|
||||
return device.changeableValues.coolSetpoint
|
||||
return device.changeableValues.heatSetpoint
|
||||
return None
|
||||
|
||||
@ -266,7 +268,14 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
|
||||
temp = kwargs.get(ATTR_TEMPERATURE)
|
||||
_LOGGER.debug("Set temperature: %s", temp)
|
||||
try:
|
||||
await self._update_thermostat(self.location, device, heatSetpoint=temp)
|
||||
if self.hvac_mode == HVAC_MODE_COOL:
|
||||
await self._update_thermostat(
|
||||
self.location, device, coolSetpoint=temp
|
||||
)
|
||||
else:
|
||||
await self._update_thermostat(
|
||||
self.location, device, heatSetpoint=temp
|
||||
)
|
||||
except LYRIC_EXCEPTIONS as exception:
|
||||
_LOGGER.error(exception)
|
||||
await self.coordinator.async_refresh()
|
||||
|
Loading…
x
Reference in New Issue
Block a user