1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-14 14:48:18 +00:00

Suggested fix for empty domain (#555)

* Suggested fix for empty domain

Signed-off-by: delphi <cpp.create@gmail.com>

* Added proposed changes

Signed-off-by: delphi <cpp.create@gmail.com>
This commit is contained in:
Pavel Pletenev 2019-05-26 11:28:46 +03:00 committed by Otto Winter
parent af9d5a28a5
commit 23de2e1f70
2 changed files with 6 additions and 1 deletions

View File

@ -450,7 +450,9 @@ def validate_config(config):
result.remove_output_path([domain], domain)
# Ensure conf is a list
if not isinstance(conf, list) and conf:
if not conf:
result[domain] = conf = []
elif not isinstance(conf, list):
result[domain] = conf = [conf]
for i, p_config in enumerate(conf):

View File

@ -238,3 +238,6 @@ interval:
interval: 5s
then:
- logger.log: "Interval Run"
display: