1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-31 16:08:15 +01:00

Update __init__.py

This commit is contained in:
Oliver Kleinecke 2025-02-05 17:39:30 +01:00 committed by GitHub
parent cf94a29163
commit fc70ba1dd8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,4 +51,5 @@ async def to_code(config):
config[CONF_TERMINAL_W],
)
await output.register_output(var, config)
cg.add(var.set_initial_value(config[CONF_INITIAL_VALUE]))
if CONF_INITIAL_VALUE in config:
cg.add(var.set_initial_value(config[CONF_INITIAL_VALUE]))