Skip to content

Commit

Permalink
Don't use term unknown in log messages - confuses HA
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkahn committed Dec 31, 2024
1 parent 68fa10f commit ca73c62
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions gitver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
committime = "Fri Dec 27 12:38:32 2024"
commitseq = 48
committime = "Tue Dec 31 15:15:57 2024"
commitseq = 49
extratest = 'ablc'

5 changes: 3 additions & 2 deletions hubs/ha/hasshub.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ def on_message(qws, message):
# HA just finished initializing everything, so we may have been quicker - refresh all state
self.GetAllCurrentState()
else:
logsupport.Logs.Log('{} Unknown event: {}'.format(self.name, message), severity=ConsoleWarning)
logsupport.Logs.Log('{} Unrecognized event: {}'.format(self.name, message), severity=ConsoleWarning)
ignoredeventtypes.append(m['event_type']) # only log once
debug.debugPrint('HASSgeneral', "Unknown event: " + str(m))
except Exception as E:
Expand Down Expand Up @@ -758,7 +758,8 @@ def on_error(qws, error):
else:
logsupport.Logs.Log(self.name + ' WS OS error', repr(error), severity=ConsoleError, tb=False)
else:
logsupport.Logs.Log(self.name + ": Unknown Error in WS stream " + str(self.HAnum) + ':' + repr(error),
logsupport.Logs.Log(
self.name + ": Unrecognized Error in WS stream " + str(self.HAnum) + ':' + repr(error),
severity=ConsoleWarning)
# noinspection PyBroadException
try:
Expand Down
2 changes: 1 addition & 1 deletion hubs/isy/isyeventmonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def on_message(qws, message):
self.isy.Vars.SetValByAttr((vartype, varid), varval, modifier=True)
except KeyError:
logsupport.Logs.Log(
"Unknown variable from " + self.hubname + " - probably added since startup",
"Unrecognized variable from " + self.hubname + " - probably added since startup",
severity=ConsoleWarning)

elif prcode == 'Heartbeat':
Expand Down
2 changes: 1 addition & 1 deletion issuecommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def IssueCommand(source, cmd, seq, fromnd, param=None):
except Exception as E:
logsupport.Logs.Log('Exc: {}'.format(repr(E)))
else:
logsupport.Logs.Log('{}: Unknown remote command request: {}'.format(source, cmd),
logsupport.Logs.Log('{}:Unrecognized remote command request: {}'.format(source, cmd),
severity=ConsoleWarning)


Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Fri Dec 27 12:38:32 2024/48
#Tue Dec 31 15:15:57 2024/49
configobj~=5.0.8
webcolors~=1.13
xmltodict~=0.13.0
Expand Down
2 changes: 1 addition & 1 deletion stores/mqttsupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def on_message(client, userdata, msg):
# noinspection PySimplifyBooleanCheck
# not a command/status message
if var == []:
logsupport.Logs.Log('Unknown topic ', msgtopic, ' from broker ', self.name,
logsupport.Logs.Log('Unrecognized topic ', msgtopic, ' from broker ', self.name,
severity=ConsoleWarning)
else:
for v in var:
Expand Down

0 comments on commit ca73c62

Please sign in to comment.