mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Alexa gracefully handle climate devices without presets (#29010)
This commit is contained in:
parent
647595fd67
commit
48c289fad3
@ -752,10 +752,11 @@ 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)
|
||||||
for mode in preset_modes:
|
if preset_modes:
|
||||||
thermostat_mode = API_THERMOSTAT_PRESETS.get(mode)
|
for mode in preset_modes:
|
||||||
if thermostat_mode:
|
thermostat_mode = API_THERMOSTAT_PRESETS.get(mode)
|
||||||
supported_modes.append(thermostat_mode)
|
if thermostat_mode:
|
||||||
|
supported_modes.append(thermostat_mode)
|
||||||
|
|
||||||
# Return False for supportsScheduling until supported with event listener in handler.
|
# Return False for supportsScheduling until supported with event listener in handler.
|
||||||
configuration = {"supportsScheduling": False}
|
configuration = {"supportsScheduling": False}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user