Skip to content

Commit

Permalink
Merge pull request #4 from freifunkMUC/T0biii-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
T0biii authored Jan 9, 2025
2 parents ad26a07 + 9ee8be2 commit 53bfa2a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions omada_respondd/omada_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_client_count_for_ap(clients, cfg):
client5_count = 0
client24_count = 0
for client in clients:
if re.search(cfg.ssid_regex, client.get("ssid", "")):
if re.search(cfg.ssid_regex, client.get("ssid", ""), re.IGNORECASE):
if client.get("channel", 0) > 14:
client5_count += 1
else:
Expand All @@ -93,7 +93,7 @@ def get_traffic_count_for_ap(clients, cfg):
tx = 0
rx = 0
for client in clients:
if re.search(cfg.ssid_regex, client.get("ssid", "")):
if re.search(cfg.ssid_regex, client.get("ssid", ""), re.IGNORECASE):
tx += client.get("trafficUp", 0)
rx += client.get("trafficDown", 0)

Expand Down Expand Up @@ -167,7 +167,9 @@ def get_infos():
containsSSID = False
if ssids is not None:
for ssid in ssids:
if re.search(cfg.ssid_regex, ssid.get("ssid", "")):
if re.search(
cfg.ssid_regex, ssid.get("ssid", ""), re.IGNORECASE
):
if (ssid.get("ssidEnabled"), False):
containsSSID = True

Expand Down

0 comments on commit 53bfa2a

Please sign in to comment.