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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user