diff --git a/apps/cubes/cube.py b/apps/cubes/cube.py index 31e4b87..cb44f6a 100644 --- a/apps/cubes/cube.py +++ b/apps/cubes/cube.py @@ -20,10 +20,15 @@ class AqaraCube(Mqtt): if action == '': return elif (handler := getattr(self, f'handle_{action}', None)): + if (arg := self.args.get(action, None)) is not None: + self.action_handler(action_description=arg) handler(payload) else: self.log(f'Unhandled cube action: {action}') + def action_handler(self, action_description): + self.log(f'{self.args["cube"]}: generic action handler: {action_description}') + def handle_rotate_right(self, payload): self.log(f'{self.args["cube"]}: Rotate right')