[thermostat] Fix on_boot_restore_from DEFAULT_PRESET validation bypass (#15383)

This commit is contained in:
Jonathan Swoboda
2026-04-02 15:08:43 -04:00
committed by GitHub
parent da8d9d9c2d
commit e7e590b36f
+1 -1
View File
@@ -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(