match names to cli

This commit is contained in:
J. Nick Koston
2023-10-31 20:06:02 -05:00
parent 5e290633ed
commit a63e0bed2d
4 changed files with 27 additions and 17 deletions

View File

@@ -65,8 +65,20 @@ async def test_smart_device_from_value():
assert DeviceType.from_value(name.value) is not None
assert DeviceType.from_value("nonexistent") is DeviceType.Unknown
assert DeviceType.from_value("Plug") is DeviceType.Plug
assert DeviceType.Plug.value == "Plug"
assert DeviceType.from_value("plug") is DeviceType.Plug
assert DeviceType.Plug.value == "plug"
assert DeviceType.from_value("bulb") is DeviceType.Bulb
assert DeviceType.Bulb.value == "bulb"
assert DeviceType.from_value("dimmer") is DeviceType.Dimmer
assert DeviceType.Dimmer.value == "dimmer"
assert DeviceType.from_value("strip") is DeviceType.Strip
assert DeviceType.Strip.value == "strip"
assert DeviceType.from_value("lightstrip") is DeviceType.LightStrip
assert DeviceType.LightStrip.value == "lightstrip"
async def test_query_helper(dev):