From d544644e0e2282d0fa2074cb2360401c13015ad3 Mon Sep 17 00:00:00 2001 From: hoon <230467962+atc722@users.noreply.github.com> Date: Sat, 1 Aug 2026 11:29:30 +0900 Subject: [PATCH] Clarify resource override comment --- .../localthings/registry/by_type/__init__.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/custom_components/localthings/registry/by_type/__init__.py b/custom_components/localthings/registry/by_type/__init__.py index 879a7c5..df1dc02 100644 --- a/custom_components/localthings/registry/by_type/__init__.py +++ b/custom_components/localthings/registry/by_type/__init__.py @@ -296,13 +296,12 @@ def for_device_by_model(model_num: str, description: str) -> Optional[DeviceRegi def for_device_by_resources(resources: dict[str, dict]) -> Optional[DeviceRegistry]: """Detect a device family from a distinctive local-resource signature. - This is the highest-confidence routing signal: the live capability surface - wins over OIC/model metadata when they disagree (Qooker's ``oic.d.oven`` - declaration is the first verified case). It also types boards that ship no - ``/information/vs/0`` at all, leaving `for_device_by_model` nothing to - read. Some newer cooktops are the original case: their mode resource still - identifies them, carrying a DeviceType option and multiple per-burner - OperationState options. + This runs first as an override path for non-standard devices, not because + resource signatures are inherently more trustworthy than OIC/model + metadata. It also types boards that ship no ``/information/vs/0`` at all, + leaving `for_device_by_model` nothing to read. Some newer cooktops are the + original case: their mode resource still identifies them, carrying a + DeviceType option and multiple per-burner OperationState options. Require two independent shapes for every signature here, never one, so putting this ahead of OIC/model metadata cannot let a common resource