1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 06:33:51 +00:00

Add NTC and resistance sensor (#560)

* Add NTC and resistance sensor

Fixes https://github.com/esphome/feature-requests/issues/248

* Fix

* Fix platformio4 moved get_project_dir
This commit is contained in:
Otto Winter
2019-05-28 16:00:00 +02:00
committed by GitHub
parent 9fa1a334e6
commit 61ba2e0f35
12 changed files with 321 additions and 2 deletions

View File

@@ -127,7 +127,10 @@ def wrap_to_code(name, comp):
def wrapped(conf):
cg.add(cg.LineComment(u"{}:".format(name)))
if comp.config_schema is not None:
cg.add(cg.LineComment(indent(yaml_util.dump(conf).decode('utf-8'))))
conf_str = yaml_util.dump(conf)
if IS_PY2:
conf_str = conf_str.decode('utf-8')
cg.add(cg.LineComment(indent(conf_str)))
yield coro(conf)
return wrapped