Fix warnings about comments in lambdas

Fixes https://github.com/esphome/issues/issues/593
This commit is contained in:
Otto Winter 2019-08-27 21:51:59 +02:00
parent 947a6034e3
commit 5348b36a7c
No known key found for this signature in database
GPG key ID: DB66C0BE6013F97E

View file

@ -130,6 +130,7 @@ def wrap_to_code(name, comp):
conf_str = yaml_util.dump(conf)
if IS_PY2:
conf_str = conf_str.decode('utf-8')
conf_str = conf_str.replace('//', '')
cg.add(cg.LineComment(indent(conf_str)))
yield coro(conf)