Add range to alarm_volume feature

This commit is contained in:
Steven B
2025-01-23 12:40:06 +00:00
parent a621761dd4
commit b1f7754f36
2 changed files with 30 additions and 10 deletions

View File

@@ -35,6 +35,21 @@ async def test_features(dev: SmartDevice, feature: str, prop_name: str, type: ty
assert isinstance(feat.value, type)
@alarm
async def test_volume_feature(dev: SmartDevice):
"""Test that volume feature has correct choices and range."""
alarm = next(get_parent_and_child_modules(dev, Module.Alarm))
assert alarm is not None
volume_feat = alarm.get_feature("alarm_volume")
assert volume_feat
assert volume_feat.minimum_value == 0
assert volume_feat.maximum_value == 3
assert volume_feat.choices == ["mute", "low", "normal", "high"]
@alarm
@pytest.mark.parametrize(
("kwargs", "request_params"),