Return scada properties from API getelementproperties

This commit is contained in:
DingZQ
2025-02-12 22:56:51 +08:00
parent 4872772165
commit f7d612d522
2 changed files with 5 additions and 3 deletions

View File

@@ -432,14 +432,15 @@ def get_element_properties(name: str, type: str, element_id: str) -> dict[str, A
return {}
# DingZQ, 2025-02-05
# element_id can be 'node' 'link' 'scada'
def get_element_properties(name: str, element_id: str) -> dict[str, Any]:
if api.is_node(name, element_id):
return get_node_properties(name, element_id)
elif api.is_link(name, element_id):
return get_link_properties(name, element_id)
else:
return {}
return get_scada_element(name, element_id)
############################################################
# title 1.[TITLE]
############################################################