From 0ade9baf65eb9e2eff483f1abf5de8bb2238cf82 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Sat, 27 Oct 2018 14:10:37 +0200 Subject: [PATCH] Fix automation validation --- esphomeyaml/automation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/esphomeyaml/automation.py b/esphomeyaml/automation.py index ee3a8113dc..c8dd9dab54 100644 --- a/esphomeyaml/automation.py +++ b/esphomeyaml/automation.py @@ -1,3 +1,5 @@ +import copy + import voluptuous as vol from esphomeyaml import core @@ -28,8 +30,9 @@ def validate_recursive_condition(value): def validate_recursive_action(value): - value = cv.ensure_list(value) + value = cv.ensure_list(value)[:] for i, item in enumerate(value): + item = copy.deepcopy(item) if not isinstance(item, dict): raise vol.Invalid(u"Action must consist of key-value mapping! Got {}".format(item)) key = next((x for x in item if x != CONF_ACTION_ID), None)