[mcp4461] Fix terminal disable passing string where C++ expects char (#15528)

This commit is contained in:
Jonathan Swoboda
2026-04-07 17:07:28 -04:00
committed by GitHub
parent 687753b0be
commit 17ec5389d8
2 changed files with 11 additions and 3 deletions

View File

@@ -48,11 +48,11 @@ async def to_code(config):
config[CONF_CHANNEL], config[CONF_CHANNEL],
) )
if not config[CONF_TERMINAL_A]: if not config[CONF_TERMINAL_A]:
cg.add(parent.initialize_terminal_disabled(config[CONF_CHANNEL], "a")) cg.add(parent.initialize_terminal_disabled(config[CONF_CHANNEL], ord("a")))
if not config[CONF_TERMINAL_B]: if not config[CONF_TERMINAL_B]:
cg.add(parent.initialize_terminal_disabled(config[CONF_CHANNEL], "b")) cg.add(parent.initialize_terminal_disabled(config[CONF_CHANNEL], ord("b")))
if not config[CONF_TERMINAL_W]: if not config[CONF_TERMINAL_W]:
cg.add(parent.initialize_terminal_disabled(config[CONF_CHANNEL], "w")) cg.add(parent.initialize_terminal_disabled(config[CONF_CHANNEL], ord("w")))
if CONF_INITIAL_VALUE in config: if CONF_INITIAL_VALUE in config:
cg.add( cg.add(
parent.set_initial_value(config[CONF_CHANNEL], config[CONF_INITIAL_VALUE]) parent.set_initial_value(config[CONF_CHANNEL], config[CONF_INITIAL_VALUE])

View File

@@ -22,3 +22,11 @@ output:
id: digipot_wiper_4 id: digipot_wiper_4
mcp4461_id: mcp4461_digipot_01 mcp4461_id: mcp4461_digipot_01
channel: D channel: D
- platform: mcp4461
id: digipot_wiper_5
mcp4461_id: mcp4461_digipot_01
channel: A
terminal_a: false
terminal_b: false
terminal_w: false