rename: unit/sub-unit -> subdevice, matching OCF terminology

"Unit"/"sub-unit" from #199's multi-indoor-device support wasn't OCF
idiomatic -- OCF calls each component of a composite device a
"subdevice" (see subdeviceIdList), so rename SubUnit -> Subdevice
throughout: the registry module, coordinator state, BoundEntity's
subdevice field, diagnostics keys (subdevices/subdevices_skipped/
subdevice_probes), entity unique_id prefixes (unit1_/sub_<uuid>_ ->
subdevice1_/subdevice_<uuid>_), device-name fallback labels, golden
fixtures, tests, README, and the adding-device-support skill.

Breaking change to entity unique_ids and diagnostics keys, acceptable
since this hasn't been released yet.
This commit is contained in:
Marc Billow committed 2026-07-29 22:57:11 +00:00
1 parent 79ac6f199d
commit 9e85395b44
32 files changed
+676 -659

No files matched your search

+2 -2
View File
@@ -106,8 +106,8 @@ def test_fac_bora_wind_strength_codes_fit_the_standard_scale():
def resource(self, href):
return self.last_resources.get(href, {})
def canonical_resources(self, sub_unit):
# This test's entity uses the default MAIN sub-unit, so the
def canonical_resources(self, subdevice):
# This test's entity uses the default MAIN subdevice, so the
# canonical view is just the raw snapshot (issue #177).
return self.last_resources