diff --git a/src/tuya_re/devices.py b/src/tuya_re/devices.py index df83455..e236479 100644 --- a/src/tuya_re/devices.py +++ b/src/tuya_re/devices.py @@ -33,8 +33,13 @@ _SZJQR_FINGERBOT = FingerbotDPs( switch=2, mode=8, down_position=9, hold_time=10, reverse=11, up_position=15, click=2 ) +_ZX5816 = FingerbotDPs( + switch=1, mode=2, hold_time=3, up_position=4, down_position=5, reverse=0, click=1 +) + _DP_MAPS: dict[str, FingerbotDPs] = { "mknd4lci": _MKND4LCI, + "knp8dybt": _ZX5816, # PEARL/Luminea ZX-5816 # original Fingerbot + Plus (category szjqr), same control DPs **dict.fromkeys( [ diff --git a/tests/test_devices.py b/tests/test_devices.py index 68b356f..6fc2124 100644 --- a/tests/test_devices.py +++ b/tests/test_devices.py @@ -20,6 +20,14 @@ def test_fingerbot_plus_szjqr_map(): assert dps.mode == 8 +def test_pearl_zx5816_map(): + dps = dp_map_for("knp8dybt") + assert dps.click == 1 + assert dps.switch == 1 + assert dps.mode == 2 + assert dps.hold_time == 3 + + def test_unknown_product_raises(): with pytest.raises(ValueError): dp_map_for("nope")