1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-22 21:22:22 +01:00

Misc fixes for esp-idf (#2386)

This commit is contained in:
Otto Winter
2021-09-25 10:05:32 +02:00
committed by GitHub
parent d344b1ca0e
commit 5342edf04a
2 changed files with 11 additions and 7 deletions

View File

@@ -247,6 +247,11 @@ async def _add_automations(config):
@coroutine_with_priority(100.0)
async def to_code(config):
cg.add_global(cg.global_ns.namespace("esphome").using)
# These can be used by user lambdas, put them to default scope
cg.add_global(cg.RawExpression("using std::isnan"))
cg.add_global(cg.RawExpression("using std::min"))
cg.add_global(cg.RawExpression("using std::max"))
cg.add(
cg.App.pre_setup(
config[CONF_NAME],