1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-04 20:32:21 +01:00

Dashboard editor live validation (#540)

* Dashboard editor validation

* Improve range detection

* Lint
This commit is contained in:
Otto Winter
2019-05-11 11:41:09 +02:00
committed by GitHub
parent e373620393
commit a1a7448868
7 changed files with 134 additions and 19 deletions

View File

@@ -2,6 +2,7 @@ from __future__ import print_function
import codecs
import json
import os
from esphome.core import CORE, EsphomeError
from esphome.py_compat import safe_input
@@ -9,7 +10,8 @@ from esphome.py_compat import safe_input
def read_config_file(path):
# type: (basestring) -> unicode
if CORE.vscode:
if CORE.vscode and (not CORE.ace or
os.path.abspath(path) == os.path.abspath(CORE.config_path)):
print(json.dumps({
'type': 'read_file',
'path': path,