Combi microwave units report their vent fan on the same resource shape a standalone range hood uses, so reuse range_hood.HOOD_FAN directly in the microwave registry. Unlike a standalone hood, this board has no sibling /power/0 or /power/vs/0 resource, so LocalThingsRangeHoodFan now falls back to treating fan speed 0 as the off state when no separate power resource is present. Also gate HOOD_FAN's automatic_operation sensor on field presence, since this board doesn't report it.
This commit is contained in:
8 files changed
+387
-11
No files matched your search
@@ -23,6 +23,22 @@ def test_microwave_fixture_resolves_and_has_no_unbound_hrefs():
|
||||
assert unbound == []
|
||||
|
||||
|
||||
def test_microwave_hood_fan_fixture_resolves_and_has_no_unbound_hrefs():
|
||||
"""Issues #137/#142: `/hood/fanspeed/vs/0` (the combi unit's built-in
|
||||
vent fan) was previously unbound on this family."""
|
||||
from tests.conftest import _load_device
|
||||
resources = _load_device('microwave_me7500d')
|
||||
info = resources['/information/vs/0']
|
||||
reg = for_device_by_model(
|
||||
info['x.com.samsung.da.modelNum'], info['x.com.samsung.da.description'])
|
||||
assert reg is not None
|
||||
assert reg.name == 'microwave'
|
||||
|
||||
unbound = []
|
||||
discover(resources, reg.capabilities, reg.pattern_capabilities, log=unbound.append)
|
||||
assert unbound == []
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# MICROWAVE_SETPOINT — NumberDesc with RMW write semantics
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user