From 12f00a9d3d4e5354bd3c21b414b60cc14e04ee73 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Sat, 29 Jun 2024 14:12:59 +1200 Subject: [PATCH] [mpr121] await register parented (#7014) fixes https://github.com/esphome/issues/issues/5913 --- esphome/components/mpr121/binary_sensor/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/mpr121/binary_sensor/__init__.py b/esphome/components/mpr121/binary_sensor/__init__.py index 292c631c37..dfae92a9af 100644 --- a/esphome/components/mpr121/binary_sensor/__init__.py +++ b/esphome/components/mpr121/binary_sensor/__init__.py @@ -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]))