feat: fill per-device-type registries; add DOOR_GENERIC, OVEN_CONNECTED, dryer caps
- DOOR_GENERIC pattern cap (rt_filter=oic.r.door) in fridge.py with key_fn - OVEN_CONNECTED (cloud connectivity) added to oven caps - dryer.py: DRYER_SETTINGS, DRYER_COURSE, JOB_BEGINNING_STATUS, DRYER_DIAGNOSIS - Dishwasher, refrigerator, oven, dryer DeviceRegistry objects fully populated - Refrigerator registry includes DOOR_GENERIC as pattern cap - Oven registry includes OVEN_SETPOINT + OVEN_MODE (safe: no fridge caps in oven registry)
This commit is contained in:
1 parent
e801af9ab7
commit
1b36ec4a59
9 files changed
+310
-6
No files matched your search
@@ -340,3 +340,25 @@ FIRMWARE_UPDATE = Capability(
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Generic door pattern capability (href=None — use as pattern_cap only)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
def _door_key(href: str) -> str:
|
||||
# /door/cooler/0 -> door_cooler_open ; /door/wine/0 -> door_wine_open
|
||||
segs = [s for s in href.strip('/').split('/') if s and not s.isdigit()]
|
||||
return '_'.join(segs) + '_open'
|
||||
|
||||
|
||||
DOOR_GENERIC = Capability(
|
||||
href=None,
|
||||
rt_filter='oic.r.door',
|
||||
poll_tier='hot',
|
||||
key_fn=_door_key,
|
||||
entities=(
|
||||
BinarySensorDesc(key='door_open', field='openState',
|
||||
name=None, device_class='door',
|
||||
value_fn=lambda v: v == 'Open'),
|
||||
),
|
||||
)
|
||||
Reference in new issue
Block a user