fixes updating a value through sio client

This commit is contained in:
Mose Müller 2024-03-27 16:18:04 +01:00
parent 8979a1885e
commit 780a2466d3

View File

@ -22,10 +22,13 @@ class UpdateDict(TypedDict):
Attributes: Attributes:
---------- ----------
access_path : string
The full access path of the attribute to be updated.
value : SerializedObject value : SerializedObject
The serialized new value to be assigned to the attribute. The serialized new value to be assigned to the attribute.
""" """
access_path: str
value: SerializedObject value: SerializedObject
@ -124,7 +127,7 @@ def setup_sio_events(sio: socketio.AsyncServer, state_manager: StateManager) ->
@sio.event @sio.event
async def update_value(sid: str, data: UpdateDict) -> None: async def update_value(sid: str, data: UpdateDict) -> None:
path = data["value"]["full_access_path"] path = data["access_path"]
# this should probably happen within the following function call -> can also # this should probably happen within the following function call -> can also
# look at the current type of the attribute at "path" # look at the current type of the attribute at "path"