mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Honeywell Correct key name (#87018)
* Correct key name * Logic error around setpoint and auto mode * Set tempurature and setpoints correctly * Only high/low in auto.
This commit is contained in:
parent
52cf6c7baf
commit
ee30f5afcc
@ -283,10 +283,10 @@ class HoneywellUSThermostat(ClimateEntity):
|
|||||||
if self._device.hold_heat is False and self._device.hold_cool is False:
|
if self._device.hold_heat is False and self._device.hold_cool is False:
|
||||||
# Get next period time
|
# Get next period time
|
||||||
hour_heat, minute_heat = divmod(
|
hour_heat, minute_heat = divmod(
|
||||||
self._device.raw_ui_data["HEATNextPeriod"] * 15, 60
|
self._device.raw_ui_data["HeatNextPeriod"] * 15, 60
|
||||||
)
|
)
|
||||||
hour_cool, minute_cool = divmod(
|
hour_cool, minute_cool = divmod(
|
||||||
self._device.raw_ui_data["COOLNextPeriod"] * 15, 60
|
self._device.raw_ui_data["CoolNextPeriod"] * 15, 60
|
||||||
)
|
)
|
||||||
# Set hold time
|
# Set hold time
|
||||||
if mode in COOLING_MODES:
|
if mode in COOLING_MODES:
|
||||||
@ -299,14 +299,9 @@ class HoneywellUSThermostat(ClimateEntity):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Set temperature if not in auto
|
# Set temperature if not in auto
|
||||||
elif mode == "cool":
|
if mode == "cool":
|
||||||
await self._device.set_setpoint_cool(temperature)
|
await self._device.set_setpoint_cool(temperature)
|
||||||
elif mode == "heat":
|
if mode == "heat":
|
||||||
await self._device.set_setpoint_heat(temperature)
|
|
||||||
elif mode == "auto":
|
|
||||||
if temperature := kwargs.get(ATTR_TARGET_TEMP_HIGH):
|
|
||||||
await self._device.set_setpoint_cool(temperature)
|
|
||||||
if temperature := kwargs.get(ATTR_TARGET_TEMP_LOW):
|
|
||||||
await self._device.set_setpoint_heat(temperature)
|
await self._device.set_setpoint_heat(temperature)
|
||||||
|
|
||||||
except AIOSomecomfort.SomeComfortError as err:
|
except AIOSomecomfort.SomeComfortError as err:
|
||||||
@ -316,6 +311,14 @@ class HoneywellUSThermostat(ClimateEntity):
|
|||||||
"""Set new target temperature."""
|
"""Set new target temperature."""
|
||||||
if {HVACMode.COOL, HVACMode.HEAT} & set(self._hvac_mode_map):
|
if {HVACMode.COOL, HVACMode.HEAT} & set(self._hvac_mode_map):
|
||||||
await self._set_temperature(**kwargs)
|
await self._set_temperature(**kwargs)
|
||||||
|
try:
|
||||||
|
if temperature := kwargs.get(ATTR_TARGET_TEMP_HIGH):
|
||||||
|
await self._device.set_setpoint_cool(temperature)
|
||||||
|
if temperature := kwargs.get(ATTR_TARGET_TEMP_LOW):
|
||||||
|
await self._device.set_setpoint_heat(temperature)
|
||||||
|
|
||||||
|
except AIOSomecomfort.SomeComfortError as err:
|
||||||
|
_LOGGER.error("Invalid temperature %.1f: %s", temperature, err)
|
||||||
|
|
||||||
async def async_set_fan_mode(self, fan_mode: str) -> None:
|
async def async_set_fan_mode(self, fan_mode: str) -> None:
|
||||||
"""Set new target fan mode."""
|
"""Set new target fan mode."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user