mqtt and newdev name regex

This commit is contained in:
jokob-sk
2025-02-20 07:57:28 +11:00
parent 9d4eafea42
commit 458577e071
3 changed files with 7 additions and 3 deletions

View File

@@ -624,7 +624,7 @@ def cleanDeviceName(str, match_IP):
str = re.sub(rgx, "", str)
mylog('trace', ["[cleanDeviceName] name after regex : " + str])
str = re.sub(r'\.\b', '', str) # trailing dot after words
# str = re.sub(r'\.\b', '', str) # trailing dot after words
str = re.sub(r'\.$', '', str) # trailing dot at the end of the string
str = str.replace(". (IP match)", " (IP match)") # Remove dot if (IP match) is added