diff --git a/get-lights.py b/get-lights.py index 975bf25..9f4c620 100755 --- a/get-lights.py +++ b/get-lights.py @@ -43,10 +43,10 @@ with urllib.request.urlopen(req, context=no_cert_check) as response: json_data = json.loads(content) -print(f"{'ID':>2s}: {'Name':<32s} {'State':<5s} Type") +print(f"{'ID':>3s} {'Name':<32s} {'State':<5s} Type") print ("################################################################################") for key in json_data: if not json_data[key]['state']['reachable']: continue state = 'on' if json_data[key]['state']['on'] else 'off' - print(f"{key:>2s}: {json_data[key]['name']:<32s} {state:<5s} {json_data[key]['type']}") + print(f"{key:>3s}: {json_data[key]['name']:<32s} {state:<5s} {json_data[key]['type']}")