Dispatch device commands to the appropriate handler.

def dispatch_command(self, command, params=None):
        """Dispatch device commands to the appropriate handler."""
        try:
            if command in self.handlers:
                self.handlers[command](**params)
            else:
                logging.warning('Unsupported command: %s: %s',
                                command, params)
        except Exception as e:
            logging.warning('Error during command execution',
                            exc_info=sys.exc_info())
            raise e