Fix water-purifier hot-water lock mislabel, add range-hood after-run support

Water purifier (#144, #145): /favorite/hotwater/vs/0's switchHotwater field
is a Locked/Unlocked hot-water lock, not a "favorite enabled" flag. It's the
same lock as LOCK.hotwater_lock, just surfaced through this href on boards
that don't populate /status/lock/vs/0's hotwaterLock -- the two now share
the hotwater_lock key/translation, gated so only one is ever active.

Range hood (#147): binds /afterrun/vs/0 (after-run activation state,
progress, and a cancel button), clearing the last unbound href for
AHD-WW-TP1-22-COMMON.
This commit is contained in:
Marc Billow committed 2026-07-28 02:00:57 +00:00
1 parent c19800ac00
commit 5055d6bb72
10 files changed
+137 -20

No files matched your search

+18
View File
@@ -61,6 +61,8 @@ def test_range_hood_fixture_values():
assert state['periodic_air_sensing'] is False
assert state['air_sensing_state'] == 'NonProcessing'
assert state['last_air_sensing_level'] == 'Kr2'
assert state['after_run_active'] is False
assert state['after_run_progress'] == 0
def test_one_composite_fan_is_bound():
@@ -114,3 +116,19 @@ def test_lamp_write_contract():
['hood', 'lamp', 'vs', '0'], {'x.com.samsung.lamp.current': '2'},
)
assert brightness.write_fn('Unsupported', rep) is None
def test_after_run_cancel_write_contract():
"""issue #147: /afterrun/vs/0 was previously unbound. runningCancel's
only observed value is the command name itself, so cancel is modeled as
a ButtonDesc that writes that value back."""
active, progress, cancel = range_hood.AFTER_RUN.entities
assert cancel.write_fn('Cancel', {}) == (
['afterrun', 'vs', '0'], {'x.com.samsung.da.runningCancel': 'Cancel'},
)
def test_after_run_active_reads_on_off():
active, progress, cancel = range_hood.AFTER_RUN.entities
assert active.value_fn('On') is True
assert active.value_fn('Off') is False