chore(washer): declare washer's redundant/empty hrefs as ignored
This commit is contained in:
@@ -94,4 +94,19 @@ IGNORED: list[Capability] = [
|
||||
Capability(href='/energy/planner/vs/0'),
|
||||
# Temperature-unit display preference, redundant with HA's own units.
|
||||
Capability(href='/wm/submode/vs/0'),
|
||||
|
||||
# Read-only re-encoding of the course already exposed by
|
||||
# washer.WASHER_COURSE at /course/vs/0 (x.com.samsung.da.st.washerMode
|
||||
# is literally "Table_02_Course_<same hex code>").
|
||||
Capability(href='/st/washercourse/vs/0'),
|
||||
# Empty on every washer dump seen so far.
|
||||
Capability(href='/wm/welcomemsg/vs/0'),
|
||||
# User-saved custom course slots (F1-FA). No controllable/observable
|
||||
# state without a multi-slot editor; revisit if that becomes valuable.
|
||||
Capability(href='/wm/personalcourse/vs/0'),
|
||||
# OCF-native energy resource is empty ({}) on washer hardware seen so
|
||||
# far, unlike /power/0, /kidslock/0, /remotectrl/0 which do carry real
|
||||
# data -- common.ENERGY_METER on /energy/consumption/vs/0 is the only
|
||||
# real source for this control.
|
||||
Capability(href='/energy/consumption/0'),
|
||||
]
|
||||
|
||||
@@ -57,3 +57,16 @@ def test_dishwasher_fixture_has_no_remaining_gaps():
|
||||
resources = _load('dishwasher_device.json')
|
||||
unbound = set(_unbound_hrefs(resources, dishwasher.REGISTRY))
|
||||
assert unbound == set()
|
||||
|
||||
|
||||
class TestWasherIgnoredHrefs:
|
||||
def test_washer_hrefs_are_ignored(self):
|
||||
from custom_components.localthings.registry.capabilities.ignored import IGNORED
|
||||
ignored_hrefs = {cap.href for cap in IGNORED}
|
||||
for href in (
|
||||
'/st/washercourse/vs/0',
|
||||
'/wm/welcomemsg/vs/0',
|
||||
'/wm/personalcourse/vs/0',
|
||||
'/energy/consumption/0',
|
||||
):
|
||||
assert href in ignored_hrefs, f"{href} should be in ignored.IGNORED"
|
||||
|
||||
Reference in New Issue
Block a user