mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +01:00
[mpr121] await register parented (#7014)
fixes https://github.com/esphome/issues/issues/5913
This commit is contained in:
parent
1f5442f1ba
commit
d0ab2a16a6
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ async def to_code(config):
|
|||
var = await binary_sensor.new_binary_sensor(config)
|
||||
hub = await cg.get_variable(config[CONF_MPR121_ID])
|
||||
cg.add(var.set_channel(config[CONF_CHANNEL]))
|
||||
cg.register_parented(var, hub)
|
||||
await cg.register_parented(var, hub)
|
||||
|
||||
if CONF_TOUCH_THRESHOLD in config:
|
||||
cg.add(var.set_touch_threshold(config[CONF_TOUCH_THRESHOLD]))
|
||||
|
|
Loading…
Reference in a new issue