This commit is contained in:
RangerCD 2024-12-23 22:41:42 +08:00 committed by GitHub
commit 8f64687aa2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1198,8 +1198,8 @@ class MIoTEventEntity(Entity):
def __on_event_occurred(self, params: dict, ctx: Any) -> None: def __on_event_occurred(self, params: dict, ctx: Any) -> None:
_LOGGER.debug('event occurred, %s', params) _LOGGER.debug('event occurred, %s', params)
trans_arg = {} trans_arg = {}
try:
for item in params['arguments']: for item in params['arguments']:
try:
if 'value' not in item: if 'value' not in item:
continue continue
if 'piid' in item: if 'piid' in item:
@ -1216,7 +1216,7 @@ class MIoTEventEntity(Entity):
} }
break break
except KeyError as error: except KeyError as error:
_LOGGER.error( _LOGGER.debug(
'on event msg, invalid args, %s, %s, %s', 'on event msg, invalid args, %s, %s, %s',
self.entity_id, params, error) self.entity_id, params, error)
self.on_event_occurred( self.on_event_occurred(