--- a/modbus/web_settings.py Fri Jun 12 14:40:50 2020 +0200
+++ b/modbus/web_settings.py Mon Jun 15 14:27:58 2020 +0200
@@ -488,7 +488,7 @@
def __OnButtonSave(**kwargs):
OnButtonSave(WebNode_id=WebNode_id, **kwargs)
- WebSettings = NS.newExtensionSetting("Modbus "+config_hash)
+ WebSettings = NS.newExtensionSetting("Modbus #"+ str(WebNode_id), config_hash)
WebSettings.addSettings(
"ModbusConfigParm" + config_hash, # name (internal, may not contain spaces, ...)
@@ -605,10 +605,10 @@
# Delete the Modbus specific web interface extensions
# (Safe to ask to delete, even if it has not been added!)
- global _WebNodeList
- for WebNode_entry in _WebNodeList:
+ global _WebNodeList
+ for index, WebNode_entry in enumerate(_WebNodeList):
config_hash = WebNode_entry["config_hash"]
- NS.removeExtensionSetting("Modbus "+config_hash)
+ NS.removeExtensionSetting(config_hash)
# Dele all entries...
_WebNodeList = []