mirror of
https://github.com/esphome/esphome.git
synced 2026-05-24 09:56:46 +08:00
[thermostat] Fix on_boot_restore_from DEFAULT_PRESET validation bypass (#15383)
This commit is contained in:
@@ -503,7 +503,7 @@ def validate_thermostat(config):
|
||||
# If restoring default preset on boot is true then ensure we have a default preset
|
||||
if (
|
||||
CONF_ON_BOOT_RESTORE_FROM in config
|
||||
and config[CONF_ON_BOOT_RESTORE_FROM] is OnBootRestoreFrom.DEFAULT_PRESET
|
||||
and config[CONF_ON_BOOT_RESTORE_FROM] == "DEFAULT_PRESET"
|
||||
and CONF_DEFAULT_PRESET not in config
|
||||
):
|
||||
raise cv.Invalid(
|
||||
|
||||
Reference in New Issue
Block a user