From 81e3ae30b402cd3816c517e730c08015c5c70e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Solbj=C3=B8rg?= Date: Sat, 25 Feb 2023 13:32:59 +0100 Subject: fix(koblingsplan): Support connecting to multiple devices --- tools/koblingsplan/script.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools/koblingsplan/script.py') diff --git a/tools/koblingsplan/script.py b/tools/koblingsplan/script.py index e296eae..b573254 100644 --- a/tools/koblingsplan/script.py +++ b/tools/koblingsplan/script.py @@ -65,6 +65,12 @@ with open('tg23-koblingsplan.csv', newline='') as csvfile: current_iteration['b']['node_description'] = " ".join(if_data[1:]) current_iteration['b']['node'] = if_data[0] + # replace multi-device with single device + if " x " in current_iteration['a']['model'].lower(): + current_iteration['a']['model'] = current_iteration['a']['model'].split(' ')[-1] + if " x " in current_iteration['b']['model'].lower(): + current_iteration['b']['model'] = current_iteration['b']['model'].split(' ')[-1] + dataset.append(current_iteration) with open('tg23-koblingsplan.yml', 'w') as f: -- cgit v1.2.3