Skip to content

Commit

Permalink
Add Philips Hue wall switch RDM004 variant
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJulianJES committed Nov 25, 2024
1 parent 77c05e7 commit e821752
Showing 1 changed file with 56 additions and 3 deletions.
59 changes: 56 additions & 3 deletions zhaquirks/philips/wall_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
PressType,
)

DEVICE_SPECIFIC_UNKNOWN = 64512


class PhilipsWallSwitchBasicCluster(PhilipsBasicCluster):
"""Philips wall switch Basic cluster."""
Expand Down Expand Up @@ -99,7 +97,7 @@ class PhilipsWallSwitch(CustomDevice):
Basic.cluster_id,
PowerConfiguration.cluster_id,
Identify.cluster_id,
DEVICE_SPECIFIC_UNKNOWN,
PhilipsWallSwitchRemoteCluster.cluster_id,
],
OUTPUT_CLUSTERS: [
Identify.cluster_id,
Expand Down Expand Up @@ -137,3 +135,58 @@ class PhilipsWallSwitch(CustomDevice):
device_automation_triggers = (
PhilipsWallSwitchRemoteCluster.generate_device_automation_triggers()
)


class PhilipsWallSwitchRDM004(CustomDevice):
"""Philips RDM004 variant."""

signature = {
MODELS_INFO: [(SIGNIFY, "RDM004")],
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.NON_COLOR_SCENE_CONTROLLER,
INPUT_CLUSTERS: [
Basic.cluster_id,
PowerConfiguration.cluster_id,
Identify.cluster_id,
PhilipsWallSwitchRemoteCluster.cluster_id,
],
OUTPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
OnOff.cluster_id,
LevelControl.cluster_id,
Ota.cluster_id,
],
},
},
}

replacement = {
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.NON_COLOR_SCENE_CONTROLLER,
INPUT_CLUSTERS: [
PhilipsWallSwitchBasicCluster,
PowerConfiguration.cluster_id,
Identify.cluster_id,
PhilipsWallSwitchRemoteCluster,
],
OUTPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
OnOff.cluster_id,
LevelControl.cluster_id,
Ota.cluster_id,
],
},
},
}

device_automation_triggers = (
PhilipsWallSwitchRemoteCluster.generate_device_automation_triggers()
)

0 comments on commit e821752

Please sign in to comment.