Skip to content

Commit

Permalink
websocket: fix item access
Browse files Browse the repository at this point in the history
  • Loading branch information
Morg42 committed Oct 12, 2024
1 parent 3c63043 commit f3ceef7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/websocket/smartvisu.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ async def prepare_monitor(self, data, client_addr):
else:
newmonitor_items.append(path)
elif len(path_parts) == 2:
self.logger.debug(f"Client {self.build_log_info(client_addr)} requested to monitor item {path_parts[1]} with property {path_parts[0]}")
self.logger.debug(f"Client {self.build_log_info(client_addr)} requested to monitor item {path_parts[0]} with property {path_parts[1]}")
try:
prop = self.items.return_item(path_parts[0]).property
prop_attr = getattr(prop, path_parts[1])
Expand Down Expand Up @@ -844,8 +844,8 @@ async def update_item(self, item_name, item_value, source):

if len(path_parts) == 2:
self.logger.debug(f"Send update to Client {self.build_log_info(client_addr)} for item {path_parts[0]} with property {path_parts[1]}")
prop = self.items[path_parts[0]]['item'].property
prop_attr = getattr(prop,path_parts[1])
prop = self.items.return_item(path_parts[0]).property
prop_attr = getattr(prop, path_parts[1])
items.append([candidate, prop_attr])
continue

Expand Down

0 comments on commit f3ceef7

Please sign in to comment.