From 6b8c57441feb95f179eee86295a2fea7336948f5 Mon Sep 17 00:00:00 2001 From: coon Date: Fri, 26 Sep 2025 22:41:48 +0200 Subject: [PATCH] mqtt_client.py: add subparser for scene_recall and shutdown --- mqtt_client.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mqtt_client.py b/mqtt_client.py index 3b7e5b8..3f96c78 100644 --- a/mqtt_client.py +++ b/mqtt_client.py @@ -36,6 +36,18 @@ def main(): parser = argparse.ArgumentParser(description="Allen & Heath Qu MQTT Remote Control") parser.add_argument("mixer_ip", help="IP of the mixer") parser.add_argument("mqtt_hostname", help="IP of the MQTT broker") + + subparsers = parser.add_subparsers( + dest="command", required=True, help="Available commands" + ) + + subparsers.add_parser("shutdown", help="Shut down the mixer") + + scene_parser = subparsers.add_parser("scene_recall", help="Recall a specific scene") + scene_parser.add_argument( + "scene_number", type=int, choices=range(0, 100), help="Scene number to recall" + ) + args = parser.parse_args() print(f"Mixer IP: {args.mixer_ip}, MQTT broker hostname: {args.mqtt_hostname}")