From 8a0ebb68efeebe571b3e3e4c79c324c7bf5be799 Mon Sep 17 00:00:00 2001 From: delphi Date: Sat, 25 May 2019 20:29:28 +0300 Subject: [PATCH] Suggested fix for empty domain Signed-off-by: delphi --- esphome/config.py | 2 ++ tests/test2.yaml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/esphome/config.py b/esphome/config.py index ac22db37ad..842bb5aab6 100644 --- a/esphome/config.py +++ b/esphome/config.py @@ -452,6 +452,8 @@ def validate_config(config): # Ensure conf is a list if not isinstance(conf, list) and conf: result[domain] = conf = [conf] + elif not conf: + result[domain] = conf = [] for i, p_config in enumerate(conf): path = [domain, i] diff --git a/tests/test2.yaml b/tests/test2.yaml index 2b7ddebf3c..e3a9b0da85 100644 --- a/tests/test2.yaml +++ b/tests/test2.yaml @@ -238,3 +238,6 @@ interval: interval: 5s then: - logger.log: "Interval Run" + +display: +