diff --git a/tests/test_philips.py b/tests/test_philips.py index 5f08f7b6e6..3fdebf00a4 100644 --- a/tests/test_philips.py +++ b/tests/test_philips.py @@ -32,11 +32,11 @@ ) import zhaquirks.philips from zhaquirks.philips import Button, ButtonPressQueue, PhilipsRemoteCluster, PressType -from zhaquirks.philips.rdm001 import PhilipsRDM001 from zhaquirks.philips.rdm002 import PhilipsRDM002 from zhaquirks.philips.rom001 import PhilipsROM001 from zhaquirks.philips.rwl022 import PhilipsRWL022 from zhaquirks.philips.rwlfirstgen import PhilipsRWLFirstGen, PhilipsRWLFirstGen2 +from zhaquirks.philips.wall_switch import PhilipsWallSwitch zhaquirks.setup() @@ -95,7 +95,7 @@ }, ), ( - [PhilipsRDM001], + [PhilipsWallSwitch], { (SHORT_PRESS, TURN_ON): {COMMAND: "left_press"}, (LONG_PRESS, TURN_ON): {COMMAND: "left_hold"}, @@ -331,7 +331,7 @@ def press(self, callback, button): "dev, ep, button, events", ( ( - PhilipsRDM001, + PhilipsWallSwitch, 1, "left", ["press", "short_release"], @@ -415,7 +415,7 @@ def test_PhilipsRemoteCluster_short_press( "on", ), ( - PhilipsRDM001, + PhilipsWallSwitch, 1, "left", ), @@ -490,7 +490,7 @@ def test_PhilipsRemoteCluster_multi_press( @pytest.mark.parametrize( "dev, ep", ( - (PhilipsRDM001, 1), + (PhilipsWallSwitch, 1), (PhilipsROM001, 1), (PhilipsRWLFirstGen, 2), (PhilipsRWLFirstGen2, 2), @@ -516,7 +516,7 @@ def test_PhilipsRemoteCluster_ignore_unknown_buttons(zigpy_device_from_quirk, de ( (PhilipsROM001, 1, "on", "hold", "long_release", "hold_release"), ( - PhilipsRDM001, + PhilipsWallSwitch, 1, "left", "hold", diff --git a/zhaquirks/philips/rdm001.py b/zhaquirks/philips/wall_switch.py similarity index 90% rename from zhaquirks/philips/rdm001.py rename to zhaquirks/philips/wall_switch.py index 86b7e4be91..8d7dfae81d 100644 --- a/zhaquirks/philips/rdm001.py +++ b/zhaquirks/philips/wall_switch.py @@ -1,4 +1,4 @@ -"""Signify RDM001 device.""" +"""Signify wall switch devices (RDM001 and RDM004).""" from zigpy.profiles import zha from zigpy.quirks import CustomCluster, CustomDevice @@ -72,15 +72,20 @@ class PhilipsRdm001RemoteCluster(PhilipsRemoteCluster): ] -class PhilipsRDM001(CustomDevice): - """Philips RDM001 device.""" +class PhilipsWallSwitch(CustomDevice): + """Philips RDM001 or RDM004 device.""" signature = { # - MODELS_INFO: [(PHILIPS, "RDM001"), (SIGNIFY, "RDM001")], + MODELS_INFO: [ + (PHILIPS, "RDM001"), + (SIGNIFY, "RDM001"), + (PHILIPS, "RDM004"), # likely not needed + (SIGNIFY, "RDM004"), + ], ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID,