diff --git a/esphome/components/climate/__init__.py b/esphome/components/climate/__init__.py index 2a0a1d42ec..193f872dea 100644 --- a/esphome/components/climate/__init__.py +++ b/esphome/components/climate/__init__.py @@ -86,10 +86,6 @@ CLIMATE_CONTROL_ACTION_SCHEMA = cv.Schema({ def climate_control_to_code(config, action_id, template_arg, args): for var in get_variable(config[CONF_ID]): yield None - rhs = var.make_control_action(template_arg) - type = ControlAction.template(template_arg) - yield Pvariable(action_id, rhs, type=type) - rhs = var.make_control_action(template_arg) type = ControlAction.template(template_arg) action = Pvariable(action_id, rhs, type=type) diff --git a/esphome/components/climate/bang_bang.py b/esphome/components/climate/bang_bang.py index a8041920cd..732c7402b6 100644 --- a/esphome/components/climate/bang_bang.py +++ b/esphome/components/climate/bang_bang.py @@ -62,4 +62,5 @@ def to_code(config): ) add(control.set_away_config(away_config)) + BUILD_FLAGS = '-DUSE_BANG_BANG_CLIMATE'