From 16e7bd038833e2c1e149598697e566488b4006c0 Mon Sep 17 00:00:00 2001 From: Martin <25747549+martgras@users.noreply.github.com> Date: Mon, 13 Dec 2021 19:15:22 +0100 Subject: [PATCH] fix multi-line comment warning/error (#2891) --- esphome/__main__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/__main__.py b/esphome/__main__.py index 2f06a71b5f..6f57791480 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -145,6 +145,8 @@ def wrap_to_code(name, comp): if comp.config_schema is not None: conf_str = yaml_util.dump(conf) conf_str = conf_str.replace("//", "") + # remove tailing \ to avoid multi-line comment warning + conf_str = conf_str.replace("\\\n", "\n") cg.add(cg.LineComment(indent(conf_str))) await coro(conf)