fix(webui): encode automation update values

This commit is contained in:
chengyongru
2026-06-15 15:14:24 +08:00
parent 5892c6913b
commit f8bf6aea51
5 changed files with 41 additions and 16 deletions
+5 -1
View File
@@ -17,6 +17,7 @@ import time
from collections.abc import Callable
from pathlib import Path
from typing import TYPE_CHECKING, Any
from urllib.parse import unquote
from loguru import logger
from websockets.http11 import Request as WsRequest
@@ -782,7 +783,10 @@ def _automation_values_from_request(request: WsRequest) -> dict[str, Any] | None
try:
values = json.loads(raw)
except Exception:
return None
try:
values = json.loads(unquote(raw))
except Exception:
return None
return values if isinstance(values, dict) else None