mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 11:07:33 +00:00
[mcp4461] Fix terminal disable passing string where C++ expects char (#15528)
This commit is contained in:
@@ -48,11 +48,11 @@ async def to_code(config):
|
||||
config[CONF_CHANNEL],
|
||||
)
|
||||
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]:
|
||||
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]:
|
||||
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:
|
||||
cg.add(
|
||||
parent.set_initial_value(config[CONF_CHANNEL], config[CONF_INITIAL_VALUE])
|
||||
|
||||
@@ -22,3 +22,11 @@ output:
|
||||
id: digipot_wiper_4
|
||||
mcp4461_id: mcp4461_digipot_01
|
||||
channel: D
|
||||
|
||||
- platform: mcp4461
|
||||
id: digipot_wiper_5
|
||||
mcp4461_id: mcp4461_digipot_01
|
||||
channel: A
|
||||
terminal_a: false
|
||||
terminal_b: false
|
||||
terminal_w: false
|
||||
|
||||
Reference in New Issue
Block a user