Skip to content

Commit 933306b

Browse files
authored
Fix monitoring of functions (#2826)
1 parent 8f77450 commit 933306b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymodbus/server/simulator/http_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,10 @@ def build_html_calls(self, params: dict, html: str) -> str: # pragma: no cover
376376
for function in DecodePDU(True).list_function_codes():
377377
selected = (
378378
"selected"
379-
if function.function_code == self.call_monitor.function
379+
if function == self.call_monitor.function
380380
else ""
381381
)
382-
function_codes += f"<option value={function.function_code} {selected}>function code name</option>"
382+
function_codes += f"<option value={function} {selected}>function code name</option>"
383383
simulation_action = (
384384
"ACTIVE" if self.call_response.active != RESPONSE_INACTIVE else ""
385385
)

0 commit comments

Comments
 (0)