mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +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."""
|
"""Return the temperature we try to reach."""
|
||||||
device = self.device
|
device = self.device
|
||||||
if not device.hasDualSetpointStatus:
|
if not device.hasDualSetpointStatus:
|
||||||
|
if self.hvac_mode == HVAC_MODE_COOL:
|
||||||
|
return device.changeableValues.coolSetpoint
|
||||||
return device.changeableValues.heatSetpoint
|
return device.changeableValues.heatSetpoint
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@ -266,7 +268,14 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
|
|||||||
temp = kwargs.get(ATTR_TEMPERATURE)
|
temp = kwargs.get(ATTR_TEMPERATURE)
|
||||||
_LOGGER.debug("Set temperature: %s", temp)
|
_LOGGER.debug("Set temperature: %s", temp)
|
||||||
try:
|
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:
|
except LYRIC_EXCEPTIONS as exception:
|
||||||
_LOGGER.error(exception)
|
_LOGGER.error(exception)
|
||||||
await self.coordinator.async_refresh()
|
await self.coordinator.async_refresh()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user