From 875a3f3519cb9cb519e3c82dfcefb462b4696e45 Mon Sep 17 00:00:00 2001 From: "Bacher, Dominik" Date: Mon, 24 Jul 2023 23:24:09 +0200 Subject: [PATCH] use next to find ga address --- xknxproject/loader/project_loader.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xknxproject/loader/project_loader.py b/xknxproject/loader/project_loader.py index 3012cac..273ed27 100644 --- a/xknxproject/loader/project_loader.py +++ b/xknxproject/loader/project_loader.py @@ -92,11 +92,11 @@ def load( ) for group_address in function.group_addresses: - group_address.address = [ - g - for g in group_address_list - if g.identifier == group_address.ref_id - ][0].address + group_address.address = next( + ga.address + for ga in group_address_list + if ga.identifier == group_address.ref_id + ) return group_address_list, areas, devices, spaces, project_info, functions