heuristics docs

This commit is contained in:
jokob-sk
2025-08-05 13:27:30 +10:00
parent 1bce2e80e8
commit 4ff9d01ef5
4 changed files with 123 additions and 2 deletions

View File

@@ -141,7 +141,7 @@ def match_name(
#-------------------------------------------------------------------------------
#
def match_ip_rule(
def match_ip(
ip: str,
default_type: str,
default_icon: str
@@ -215,7 +215,7 @@ def guess_device_attributes(
# --- Loose IP-based fallback ---
if (not type_ or type_ == default_type) or (not icon or icon == default_icon):
type_, icon = match_ip_rule(ip, default_type, default_icon)
type_, icon = match_ip(ip, default_type, default_icon)
# Final fallbacks
type_ = type_ or default_type