Rename ocf/ to registry/, it's a capability registry now

The DTLS/CoAP transport code that made "ocf" an accurate name moved out to
the smartthings-local package. What's left here (capability.py, entities.py,
discovery.py, adapter.py, identity.py, capabilities/, by_type/, plus the
/device/0 batch parser) is entirely the device capability registry, so name
the package for what it does.

Flattened the redundant ocf/registry/ nesting into a single top-level
registry/ package and updated every import across the platform modules and
test suite accordingly. Verified: full test suite (80/80) passes, and the
Docker dev container reconnects to both live appliances and rediscovers
their entities cleanly after the rename.
This commit is contained in:
Marc Billow committed 2026-07-07 22:54:57 -05:00
1 parent 3502a385cc
commit b67e0e5cf5
51 files changed
+72 -70

No files matched your search

+4 -4
View File
@@ -7,14 +7,14 @@ GOLDEN = Path(__file__).parent / 'fixtures' / 'golden'
def _new_state_keys(name, resources):
from custom_components.localthings.ocf.registry.by_type import for_device
from custom_components.localthings.ocf.registry.discovery import discover
from custom_components.localthings.ocf.registry.adapter import flatten
from custom_components.localthings.registry.by_type import for_device
from custom_components.localthings.registry.discovery import discover
from custom_components.localthings.registry.adapter import flatten
otn = resources.get('/otninformation/vs/0', {})
one_ui = otn.get('swVersionInfo', {}).get('oneUiVersion', '')
reg = for_device(one_ui) if one_ui else None
if reg is None:
from custom_components.localthings.ocf.registry.registry import CAPABILITIES
from custom_components.localthings.registry.registry import CAPABILITIES
caps, pats = CAPABILITIES, []
else:
caps, pats = reg.capabilities, reg.pattern_capabilities