Skip to content

Commit

Permalink
Merge pull request #76 from highvolt-dev/bugfix/kvd21_5g_band_info
Browse files Browse the repository at this point in the history
safely access 5g band info for arcadyan gateway - fixes #75
  • Loading branch information
highvolt-dev authored Aug 6, 2022
2 parents f5941ba + cabbd3f commit 3ca7a44
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tmo_monitor/gateway/arcadyan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 3ca7a44

Please sign in to comment.