renames frontend_update socketio event to set_attribute

This commit is contained in:
Mose Müller 2023-11-09 13:53:13 +01:00
parent d18be54284
commit a323ce169e

View File

@ -79,7 +79,7 @@ class WebAPI:
sio = socketio.AsyncServer(async_mode="asgi") sio = socketio.AsyncServer(async_mode="asgi")
@sio.event # type: ignore @sio.event # type: ignore
def frontend_update(sid: str, data: UpdateDict) -> Any: def set_attribute(sid: str, data: UpdateDict) -> Any:
logger.debug(f"Received frontend update: {data}") logger.debug(f"Received frontend update: {data}")
path_list = [*data["parent_path"].split("."), data["name"]] path_list = [*data["parent_path"].split("."), data["name"]]
path_list.remove("DataService") # always at the start, does not do anything path_list.remove("DataService") # always at the start, does not do anything