Skip to content

Commit cbecee4

Browse files
committed
Do not log warnings on unhandled commands
1 parent 0d9837e commit cbecee4

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

zigpy_znp/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ def _unhandled_command(self, command: t.CommandBase):
718718
Called when a command that is not handled by any listener is received.
719719
"""
720720

721-
LOGGER.warning("Received an unhandled command: %s", command)
721+
LOGGER.debug("Command was not handled: %s", command)
722722

723723
@contextlib.asynccontextmanager
724724
async def capture_responses(self, responses):

zigpy_znp/zigbee/application.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,6 @@
7171

7272
REQUEST_RETRYABLE_ERRORS = REQUEST_TRANSIENT_ERRORS | REQUEST_ROUTING_ERRORS
7373

74-
IGNORED_ZDO_CALLBACKS = [
75-
c.ZDO.EndDeviceAnnceInd,
76-
c.ZDO.LeaveInd,
77-
c.ZDO.PermitJoinInd,
78-
c.ZDO.ParentAnnceRsp,
79-
c.ZDO.ConcentratorInd,
80-
c.ZDO.MgmtNWKUpdateNotify,
81-
c.ZDO.MgmtPermitJoinRsp,
82-
c.ZDO.NodeDescRsp,
83-
c.ZDO.SimpleDescRsp,
84-
c.ZDO.ActiveEpRsp,
85-
c.ZDO.MgmtLqiRsp,
86-
c.ZDO.BindRsp,
87-
c.ZDO.UnBindRsp,
88-
]
89-
9074
LOGGER = logging.getLogger(__name__)
9175

9276

@@ -661,13 +645,6 @@ def _bind_callbacks(self) -> None:
661645
c.ZDO.MsgCbIncoming.Callback(partial=True), self.on_zdo_message
662646
)
663647

664-
# Handle messages that we do not use to prevent unnecessary WARNINGs in logs
665-
for ignored_callback in IGNORED_ZDO_CALLBACKS:
666-
self._znp.callback_for_response(
667-
ignored_callback.Callback(partial=True),
668-
self.on_intentionally_unhandled_message,
669-
)
670-
671648
# These are responses to a broadcast but we ignore all but the first
672649
self._znp.callback_for_response(
673650
c.ZDO.IEEEAddrRsp.Callback(partial=True),

0 commit comments

Comments
 (0)