1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-12 00:02:21 +01:00

[template/text] Fix lambda config (#6655)

Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
This commit is contained in:
Anton Sergunov
2024-04-29 16:40:03 +06:00
committed by GitHub
parent c007593f72
commit 73bb4aa4d5
4 changed files with 38 additions and 1 deletions

View File

@@ -28,7 +28,7 @@ def validate(config):
raise cv.Invalid("optimistic cannot be used with lambda")
if CONF_INITIAL_VALUE in config:
raise cv.Invalid("initial_value cannot be used with lambda")
if CONF_RESTORE_VALUE in config:
if config[CONF_RESTORE_VALUE]:
raise cv.Invalid("restore_value cannot be used with lambda")
elif CONF_INITIAL_VALUE not in config:
config[CONF_INITIAL_VALUE] = ""