|
37 | 37 | "admin_password": "", |
38 | 38 | "demo_mode": False, |
39 | 39 | "gaming_quality_enabled": True, |
| 40 | + "segment_utilization_enabled": True, |
40 | 41 | "notify_webhook_url": "", |
41 | 42 | "notify_webhook_token": "", |
42 | 43 | "notify_min_severity": "warning", |
|
74 | 75 | "booked_upload": "BOOKED_UPLOAD", |
75 | 76 | "demo_mode": "DEMO_MODE", |
76 | 77 | "gaming_quality_enabled": "GAMING_QUALITY_ENABLED", |
| 78 | + "segment_utilization_enabled": "SEGMENT_UTILIZATION_ENABLED", |
77 | 79 | "bnetz_enabled": "BNETZ_ENABLED", |
78 | 80 | "notify_webhook_url": "NOTIFY_WEBHOOK_URL", |
79 | 81 | "notify_webhook_token": "NOTIFY_WEBHOOK_TOKEN", |
|
103 | 105 | } |
104 | 106 |
|
105 | 107 | INT_KEYS = {"poll_interval", "web_port", "history_days", "notify_cooldown", "health_hysteresis"} |
106 | | -BOOL_KEYS = {"demo_mode", "gaming_quality_enabled"} |
| 108 | +BOOL_KEYS = {"demo_mode", "gaming_quality_enabled", "segment_utilization_enabled"} |
107 | 109 |
|
108 | 110 | URL_KEYS = {"modem_url", "bqm_url", "speedtest_tracker_url", "notify_webhook_url"} |
109 | 111 | _ALLOWED_URL_SCHEMES = {"http", "https"} |
@@ -334,6 +336,13 @@ def is_gaming_quality_enabled(self): |
334 | 336 | val = val.lower() in ("true", "1", "yes") |
335 | 337 | return bool(val) or self.is_demo_mode() |
336 | 338 |
|
| 339 | + def is_segment_utilization_enabled(self): |
| 340 | + """True if FRITZ!Box segment utilization is enabled.""" |
| 341 | + val = self.get("segment_utilization_enabled") |
| 342 | + if isinstance(val, str): |
| 343 | + val = val.lower() in ("true", "1", "yes") |
| 344 | + return bool(val) |
| 345 | + |
337 | 346 | def is_bnetz_enabled(self): |
338 | 347 | """True if BNetzA broadband measurement feature is enabled.""" |
339 | 348 | val = self.get("bnetz_enabled") |
|
0 commit comments