Dishwasher:
- Revert remote_control to BinarySensorDesc ("Smart Control", read-only)
- Add cycle SelectDesc on /course/vs/0 via options-array RMW (AI Wash,
Pre blast, Self clean, Normal, Express 60, Heavy, Pots and pans,
Delicate, Plastic, Baby Care)
- Add Storm Wash+ and Auto release dry SwitchDescs on /course/vs/0
- Add Sanitize SwitchDesc and Smart Dry SelectDesc on /dishwasher/vs/0
- Add Sound volume NumberDesc (0–15 step 5) on /settings/sound/volume/vs/0
- Add Door LED night brightness, night start/end time to DOOR_LED capability
- Add SOUND_VOLUME capability to laundry module
Stale-state fixes (firmware leaves values set after cycle ends):
- finish_time: suppress when machine state is not active
- progress: return 'Idle' when machine state is not active
- water filter: gate WATER_FILTER capability on filterStatus != 'notused'
Translations:
- Add ICESTATUS_RUN → "Making ice" to strings.json and en.json
Tests:
- Update dishwasher and refrigerator golden fixtures to reflect current entity set
- Remove dead test_project_extrapolates_remaining_time (on_observation removed)
14 lines
574 B
Python
14 lines
574 B
Python
from custom_components.localthings.ocf.registry.capabilities.operational import OPERATIONAL_STATE
|
|
|
|
|
|
def test_machine_state_maps_samsung_to_ocf():
|
|
ms = next(e for e in OPERATIONAL_STATE.entities if e.key == 'machine_state')
|
|
assert ms.value_fn('Run') == 'active'
|
|
assert ms.value_fn('Pause') == 'pause'
|
|
assert ms.value_fn('Ready') == 'idle'
|
|
|
|
|
|
def test_active_when_true_only_when_running():
|
|
assert OPERATIONAL_STATE.active_when({'x.com.samsung.da.state': 'Run'}) is True
|
|
assert OPERATIONAL_STATE.active_when({'x.com.samsung.da.state': 'Ready'}) is False
|