mirror of
https://github.com/esphome/esphome.git
synced 2024-12-26 07:24:54 +01:00
[mpr121] await register parented (#7014)
fixes https://github.com/esphome/issues/issues/5913
This commit is contained in:
parent
7b3d6747d5
commit
12f00a9d3d
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