Skip to content

Commit

Permalink
Remove LevelControl cluster for TRADFRI plug (#2594)
Browse files Browse the repository at this point in the history
  • Loading branch information
MattWestb committed Sep 26, 2023
1 parent e1315ca commit 7385465
Showing 1 changed file with 71 additions and 1 deletion.
72 changes: 71 additions & 1 deletion zhaquirks/ikea/tradfriplug.py
Expand Up @@ -25,7 +25,7 @@
from zhaquirks.ikea import IKEA, IKEA_CLUSTER_ID


class TradfriPlug(CustomDevice):
class TradfriPlug1(CustomDevice):
"""Tradfri Plug."""

signature = {
Expand Down Expand Up @@ -94,3 +94,73 @@ class TradfriPlug(CustomDevice):
}
}
}


class TradfriPlug2(CustomDevice):
"""Tradfri Plug."""

signature = {
MODELS_INFO: [(IKEA, "TRADFRI control outlet")],
ENDPOINTS: {
# <SimpleDescriptor endpoint=1 profile=260 device_type=266
# device_version=0
# input_clusters=[0, 3, 4, 5, 6, 8, 4096] output_clusters=[5, 25, 32, 4096]>
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
LevelControl.cluster_id,
LightLink.cluster_id,
],
OUTPUT_CLUSTERS: [
Scenes.cluster_id,
Ota.cluster_id,
PollControl.cluster_id,
LightLink.cluster_id,
],
},
# <SimpleDescriptor endpoint=242 profile=41440 device_type=97
# device_version=0
# input_clusters=[33] output_clusters=[33]>
242: {
PROFILE_ID: zgp.PROFILE_ID,
DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
INPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
},
},
}

replacement = {
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
LightLink.cluster_id,
],
OUTPUT_CLUSTERS: [
Scenes.cluster_id,
Ota.cluster_id,
PollControl.cluster_id,
LightLink.cluster_id,
],
},
242: {
PROFILE_ID: zgp.PROFILE_ID,
DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
INPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
},
},
}

0 comments on commit 7385465

Please sign in to comment.