[thermostat] Fix on_boot_restore_from DEFAULT_PRESET validation bypass (#15383)
This commit is contained in:
1 parent
da8d9d9c2d
commit
e7e590b36f
1 file changed
+1
-1
@@ -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