From cd1142557e72cfdcb4ec2fd68cff52b37ee6ec5d Mon Sep 17 00:00:00 2001 From: Annika Wickert Date: Wed, 8 Jan 2025 17:19:57 +0100 Subject: [PATCH] Make it case insensitive. --- unifi_respondd/unifi_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unifi_respondd/unifi_client.py b/unifi_respondd/unifi_client.py index cfd46d3..cf9070d 100644 --- a/unifi_respondd/unifi_client.py +++ b/unifi_respondd/unifi_client.py @@ -83,7 +83,7 @@ def get_client_count_for_ap(ap_mac, clients, cfg): client5_count = 0 client24_count = 0 for client in clients: - if re.search(cfg.ssid_regex, client.get("essid", "")): + if re.search(cfg.ssid_regex, client.get("essid", ""), re.IGNORECASE): if client.get("ap_mac", "No mac") == ap_mac: if client.get("channel", 0) > 14: client5_count += 1 @@ -101,7 +101,7 @@ def get_ap_channel_usage(ssids, cfg): rx_bytes24 = None tx_bytes24 = None for ssid in ssids: - if re.search(cfg.ssid_regex, ssid.get("essid", "")): + if re.search(cfg.ssid_regex, ssid.get("essid", ""), re.IGNORECASE): channel = ssid.get("channel", 0) rx_bytes = ssid.get("rx_bytes", 0) tx_bytes = ssid.get("tx_bytes", 0)