From 65d0dd47f3b617d3fe9a26bbc1c5e561b6659329 Mon Sep 17 00:00:00 2001 From: Brandon Davidson Date: Fri, 1 Jun 2018 13:48:07 -0700 Subject: [PATCH] Fix #27 - invalid code gen for Template Cover (#29) --- esphomeyaml/components/cover/template.py | 2 +- esphomeyaml/components/switch/template.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esphomeyaml/components/cover/template.py b/esphomeyaml/components/cover/template.py index afcaee117f..9b785e45cc 100644 --- a/esphomeyaml/components/cover/template.py +++ b/esphomeyaml/components/cover/template.py @@ -25,7 +25,7 @@ def to_code(config): if CONF_LAMBDA in config: template_ = process_lambda(config[CONF_LAMBDA], []) - add(make.Ptemplate.set_state_lambda(template_)) + add(make.Ptemplate_.set_state_lambda(template_)) if CONF_OPEN_ACTION in config: actions = automation.build_actions(config[CONF_OPEN_ACTION], NoArg) add(make.Ptemplate_.add_open_actions(actions)) diff --git a/esphomeyaml/components/switch/template.py b/esphomeyaml/components/switch/template.py index 8f073da848..47a635cb74 100644 --- a/esphomeyaml/components/switch/template.py +++ b/esphomeyaml/components/switch/template.py @@ -24,7 +24,7 @@ def to_code(config): if CONF_LAMBDA in config: template_ = process_lambda(config[CONF_LAMBDA], []) - add(make.Ptemplate.set_state_lambda(template_)) + add(make.Ptemplate_.set_state_lambda(template_)) if CONF_TURN_OFF_ACTION in config: actions = automation.build_actions(config[CONF_TURN_OFF_ACTION], NoArg) add(make.Ptemplate_.add_turn_off_actions(actions))