mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
Handle uart.write in json-config endpoint (#4430)
This commit is contained in:
parent
0f1ec515c1
commit
d981d7859d
1 changed files with 6 additions and 0 deletions
|
@ -1008,8 +1008,14 @@ class SafeLoaderIgnoreUnknown(yaml.SafeLoader):
|
||||||
def ignore_unknown(self, node):
|
def ignore_unknown(self, node):
|
||||||
return f"{node.tag} {node.value}"
|
return f"{node.tag} {node.value}"
|
||||||
|
|
||||||
|
def construct_yaml_binary(self, node) -> str:
|
||||||
|
return super().construct_yaml_binary(node).decode("ascii")
|
||||||
|
|
||||||
|
|
||||||
SafeLoaderIgnoreUnknown.add_constructor(None, SafeLoaderIgnoreUnknown.ignore_unknown)
|
SafeLoaderIgnoreUnknown.add_constructor(None, SafeLoaderIgnoreUnknown.ignore_unknown)
|
||||||
|
SafeLoaderIgnoreUnknown.add_constructor(
|
||||||
|
"tag:yaml.org,2002:binary", SafeLoaderIgnoreUnknown.construct_yaml_binary
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class JsonConfigRequestHandler(BaseHandler):
|
class JsonConfigRequestHandler(BaseHandler):
|
||||||
|
|
Loading…
Reference in a new issue