Alexa gracefully handle climate devices without presets (#29010)
This commit is contained in:
parent
647595fd67
commit
48c289fad3
1 changed files with 5 additions and 4 deletions
|
@ -752,6 +752,7 @@ class AlexaThermostatController(AlexaCapability):
|
||||||
supported_modes.append(thermostat_mode)
|
supported_modes.append(thermostat_mode)
|
||||||
|
|
||||||
preset_modes = self.entity.attributes.get(climate.ATTR_PRESET_MODES)
|
preset_modes = self.entity.attributes.get(climate.ATTR_PRESET_MODES)
|
||||||
|
if preset_modes:
|
||||||
for mode in preset_modes:
|
for mode in preset_modes:
|
||||||
thermostat_mode = API_THERMOSTAT_PRESETS.get(mode)
|
thermostat_mode = API_THERMOSTAT_PRESETS.get(mode)
|
||||||
if thermostat_mode:
|
if thermostat_mode:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue