From cabbd3fa60454455b2d4d47bc6714bdae63ad9d4 Mon Sep 17 00:00:00 2001 From: highvolt-dev Date: Sat, 6 Aug 2022 17:42:30 -0400 Subject: [PATCH] safely access 5g band info for arcadyan gateway - fixes #75 --- tmo_monitor/gateway/arcadyan.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tmo_monitor/gateway/arcadyan.py b/tmo_monitor/gateway/arcadyan.py index 19237a4..3588e38 100644 --- a/tmo_monitor/gateway/arcadyan.py +++ b/tmo_monitor/gateway/arcadyan.py @@ -66,7 +66,10 @@ def get_uptime(self): def get_signal_info(self): info = self.get_all_info_web() lte_info = info['signal']['4g']['bands'] - nr_info = info['signal']['5g']['bands'] + if '5g' in info['signal']: + nr_info = info['signal']['5g']['bands'] + else: + nr_info = [] return { '4G': None if len(lte_info) == 0 else lte_info[0].upper(),