fix: address final review findings
- for_device(): suffix fallback for descriptive names
("french_door_refrigerator" → refrigerator registry)
- Capability.href_prefix: replaces rt_filter for pattern caps;
DOOR_GENERIC now uses href_prefix='/door/' (batch reps have no rt)
- discover(): apply href_prefix gate before rt_filter in pattern loop
- Remove dead bound_hrefs variable from discover()
- Remove vestigial default_observe_port from RuntimeDescriptor
This commit is contained in:
1 parent
6f681622c2
commit
1c4cb2e272
8 files changed
+26
-11
No files matched your search
@@ -37,7 +37,6 @@ def _encode(cfg: dict) -> bytes:
|
||||
class RuntimeDescriptor:
|
||||
name: str
|
||||
seed_path: list[str]
|
||||
default_observe_port: int
|
||||
active_interval_s: float = 5.0
|
||||
idle_interval_s: float = 30.0
|
||||
is_active: Optional[Callable[[dict], bool]] = None
|
||||
@@ -208,7 +207,6 @@ def build_runtime_descriptor(bound, *, topic_prefix, ha_prefix, device_name,
|
||||
return RuntimeDescriptor(
|
||||
name=name,
|
||||
seed_path=['device', '0'],
|
||||
default_observe_port=default_port or 0,
|
||||
active_interval_s=active_interval_s,
|
||||
idle_interval_s=idle_interval_s,
|
||||
is_active=_make_is_active(bound),
|
||||
|
||||
Reference in new issue
Block a user