1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-26 04:28:17 +00:00

Update __init__.py

This commit is contained in:
Oliver Kleinecke 2025-02-07 17:38:34 +01:00 committed by GitHub
parent 3f93c13a4b
commit bb043b1bb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -53,6 +53,8 @@ async def to_code(config):
config[CONF_TERMINAL_W],
)
if CONF_INITIAL_VALUE in config:
cg.add(parent.set_initial_value(config[CONF_CHANNEL], config[CONF_INITIAL_VALUE]))
cg.add(parent.set_initial_value(
config[CONF_CHANNEL], config[CONF_INITIAL_VALUE])
)
await output.register_output(var, config)
await cg.register_parented(var, config[CONF_MCP4461_ID])