refactor: auto-derive pattern cap keys from href; move dumps to tests/fixtures
Remove key_fn from Capability — pattern cap keys are now always derived automatically: strip digits from href segments, join with '_', append '_' + desc.key. /door/cooler/0 + 'open' -> door_cooler_open. DOOR_GENERIC entity key: 'open' (not 'door_open'). Remove _door_key helper. Fridge registry: DOOR_FRIDGE/DOOR_FREEZER replaced by DOOR_GENERIC pattern cap. Golden baseline: door_fridge_open -> door_cooler_open. Move device dumps to tests/fixtures/dumps/ (tracked) so tests run in CI without local-tools/ dependencies.
This commit is contained in:
1 parent
1c4cb2e272
commit
27d6d09fd9
11 files changed
+37
-51
No files matched your search
+2
-2
@@ -7,8 +7,8 @@
|
||||
"cabinet_light",
|
||||
"cabinet_light_on",
|
||||
"cabinet_light_switch",
|
||||
"door_cooler_open",
|
||||
"door_freezer_open",
|
||||
"door_fridge_open",
|
||||
"energy_kwh",
|
||||
"filter_status",
|
||||
"filter_usage",
|
||||
@@ -37,8 +37,8 @@
|
||||
"samsung_refrigerator_cabinet_light",
|
||||
"samsung_refrigerator_cabinet_light_on",
|
||||
"samsung_refrigerator_cabinet_light_switch",
|
||||
"samsung_refrigerator_door_cooler_open",
|
||||
"samsung_refrigerator_door_freezer_open",
|
||||
"samsung_refrigerator_door_fridge_open",
|
||||
"samsung_refrigerator_energy_kwh",
|
||||
"samsung_refrigerator_filter_status",
|
||||
"samsung_refrigerator_filter_usage",
|
||||
|
||||
Reference in new issue
Block a user