From 13b3412b459f6e2e124e22d1806386db0c063a9a Mon Sep 17 00:00:00 2001 From: Paul Monigatti Date: Wed, 22 Sep 2021 21:12:42 +1200 Subject: [PATCH] Fix Dallas parent not being set (#2369) --- esphome/components/dallas/sensor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/components/dallas/sensor.py b/esphome/components/dallas/sensor.py index 05c2c8b90c..14ad0efa7b 100644 --- a/esphome/components/dallas/sensor.py +++ b/esphome/components/dallas/sensor.py @@ -46,5 +46,7 @@ async def to_code(config): if CONF_RESOLUTION in config: cg.add(var.set_resolution(config[CONF_RESOLUTION])) + cg.add(var.set_parent(hub)) + cg.add(hub.register_sensor(var)) await sensor.register_sensor(var, config)