diff --git a/cli.py b/cli.py index 2514618..1a13d4a 100755 --- a/cli.py +++ b/cli.py @@ -243,6 +243,14 @@ Examples: help="Device name" ) + parser.add_argument( + "--id", + dest="device_id", + type=int, + metavar="0-255", + help="Numeric device ID used for ESPNow (0-255)" + ) + parser.add_argument( "--pin", type=int, @@ -499,6 +507,10 @@ Examples: if args.default is not None: edits["default"] = args.default + if args.device_id is not None: + # Clamp into single-byte range; store as int in settings.json + edits["id"] = max(0, min(255, args.device_id)) + # 1. Download: get current settings from device try: print(f"Downloading settings from {args.port}...", file=sys.stderr)