Fix Auto mode for TCC devices like the Lyric Round (#126091)

pull/126494/head
Numa Perez 2024-09-23 08:31:55 -04:00 committed by GitHub
parent de88068c66
commit 8410c142ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -208,7 +208,13 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
if LYRIC_HVAC_MODE_COOL in device.allowed_modes:
self._attr_hvac_modes.append(HVACMode.COOL)
if LYRIC_HVAC_MODE_HEAT_COOL in device.allowed_modes:
# TCC devices like the Lyric round do not have the Auto
# option in allowed_modes, but still support Auto mode
if LYRIC_HVAC_MODE_HEAT_COOL in device.allowed_modes or (
self._attr_thermostat_type is LyricThermostatType.TCC
and LYRIC_HVAC_MODE_HEAT in device.allowed_modes
and LYRIC_HVAC_MODE_COOL in device.allowed_modes
):
self._attr_hvac_modes.append(HVACMode.HEAT_COOL)
# Setup supported features