OVEN_SETPOINT (/temperatures/vs/0) and OVEN_MODE (/mode/vs/0) collide with fridge hrefs. Remove from ALL; only OVEN_CAVITY (/oven/vs/0) is oven-unique. Per-device-type registries (v2 plan) will restore them in the oven-only registry. Also updates golden baselines to include legitimate new entities added since original capture (cycle_active, firmware_update, power_switch for dishwasher; cabinet_light_switch, ice1 for refrigerator).
20 lines
688 B
Python
20 lines
688 B
Python
from . import common, fridge, laundry, operational, oven
|
|
from ..capability import Capability
|
|
|
|
|
|
def _is_capability(v):
|
|
return isinstance(v, Capability)
|
|
|
|
|
|
# Only OVEN_CAVITY (/oven/vs/0) is safe to include globally — that href
|
|
# is oven-unique. OVEN_SETPOINT (/temperatures/vs/0) and OVEN_MODE
|
|
# (/mode/vs/0) collide with fridge hrefs that share the same path but
|
|
# have different schemas. Those capabilities require rt_filter or class-
|
|
# scoped registry support before they can be added back to ALL.
|
|
_OVEN_GLOBAL_CAPS = [
|
|
oven.OVEN_CAVITY,
|
|
]
|
|
|
|
ALL = [v for mod in (common, operational, laundry, fridge)
|
|
for v in vars(mod).values() if _is_capability(v)] + _OVEN_GLOBAL_CAPS
|