mirror of
https://github.com/esphome/esphome.git
synced 2025-06-15 06:46:59 +02:00
Fix dashboard logging being escaped before parser (#9054)
This commit is contained in:
parent
da79215bc3
commit
0228379a2e
@ -46,12 +46,10 @@ async def async_run_logs(config: dict[str, Any], address: str) -> None:
|
||||
time_ = datetime.now()
|
||||
message: bytes = msg.message
|
||||
text = message.decode("utf8", "backslashreplace")
|
||||
if dashboard:
|
||||
text = text.replace("\033", "\\033")
|
||||
for parsed_msg in parse_log_message(
|
||||
text, f"[{time_.hour:02}:{time_.minute:02}:{time_.second:02}]"
|
||||
):
|
||||
print(parsed_msg)
|
||||
print(parsed_msg.replace("\033", "\\033") if dashboard else parsed_msg)
|
||||
|
||||
stop = await async_run(cli, on_log, name=name)
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user