mirror of
https://github.com/esphome/esphome.git
synced 2025-09-04 20:32:21 +01:00
Fix editor live validation (#6431)
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
from esphome.const import CONF_ID
|
||||
from esphome.core import CORE
|
||||
from esphome.helpers import read_file
|
||||
|
||||
|
||||
class Extend:
|
||||
@@ -38,25 +33,6 @@ class Remove:
|
||||
return isinstance(b, Remove) and self.value == b.value
|
||||
|
||||
|
||||
def read_config_file(path: str) -> str:
|
||||
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,
|
||||
}
|
||||
)
|
||||
)
|
||||
data = json.loads(input())
|
||||
assert data["type"] == "file_response"
|
||||
return data["content"]
|
||||
|
||||
return read_file(path)
|
||||
|
||||
|
||||
def merge_config(full_old, full_new):
|
||||
def merge(old, new):
|
||||
if isinstance(new, dict):
|
||||
|
Reference in New Issue
Block a user