|
| 1 | +"""Philips Hue Go 7602031P7 device.""" |
| 2 | + |
| 3 | +from zigpy.profiles import zha |
| 4 | +from zigpy.quirks import CustomDevice |
| 5 | +from zigpy.zcl.clusters.general import ( |
| 6 | + Basic, |
| 7 | + GreenPowerProxy, |
| 8 | + Groups, |
| 9 | + Identify, |
| 10 | + LevelControl, |
| 11 | + OnOff, |
| 12 | + Ota, |
| 13 | + Scenes, |
| 14 | +) |
| 15 | +from zigpy.zcl.clusters.lighting import Color |
| 16 | +from zigpy.zcl.clusters.lightlink import LightLink |
| 17 | + |
| 18 | +from zhaquirks.const import ( |
| 19 | + DEVICE_TYPE, |
| 20 | + ENDPOINTS, |
| 21 | + INPUT_CLUSTERS, |
| 22 | + MODELS_INFO, |
| 23 | + OUTPUT_CLUSTERS, |
| 24 | + PROFILE_ID, |
| 25 | +) |
| 26 | +from zhaquirks.philips import ( |
| 27 | + PHILIPS, |
| 28 | + PhilipsEffectCluster, |
| 29 | +) |
| 30 | + |
| 31 | + |
| 32 | +class Philips7602031P7(CustomDevice): |
| 33 | + """Philips 7602031P7 device.""" |
| 34 | + |
| 35 | + signature = { |
| 36 | + MODELS_INFO: [ |
| 37 | + (PHILIPS, "7602031P7"), |
| 38 | + ], |
| 39 | + ENDPOINTS: { |
| 40 | + # <SimpleDescriptor endpoint=11 profile=260 device_type=269 |
| 41 | + # device_version=1 |
| 42 | + # input_clusters=[0, 3, 4, 5, 6, 8, 768, 4096, 64513, 64515] |
| 43 | + # output_clusters=[25]> |
| 44 | + 11: { |
| 45 | + PROFILE_ID: zha.PROFILE_ID, |
| 46 | + DEVICE_TYPE: zha.DeviceType.EXTENDED_COLOR_LIGHT, |
| 47 | + INPUT_CLUSTERS: [ |
| 48 | + Basic.cluster_id, |
| 49 | + Identify.cluster_id, |
| 50 | + Groups.cluster_id, |
| 51 | + Scenes.cluster_id, |
| 52 | + OnOff.cluster_id, |
| 53 | + LevelControl.cluster_id, |
| 54 | + Color.cluster_id, |
| 55 | + LightLink.cluster_id, |
| 56 | + 64513, |
| 57 | + 64515, |
| 58 | + ], |
| 59 | + OUTPUT_CLUSTERS: [Ota.cluster_id], |
| 60 | + }, |
| 61 | + # <SimpleDescriptor endpoint=242 profile=41440 device_type=97 |
| 62 | + # device_version=0 |
| 63 | + # input_clusters=[] |
| 64 | + # output_clusters=[33]> |
| 65 | + 242: { |
| 66 | + PROFILE_ID: 41440, |
| 67 | + DEVICE_TYPE: 97, |
| 68 | + INPUT_CLUSTERS: [], |
| 69 | + OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id], |
| 70 | + }, |
| 71 | + }, |
| 72 | + } |
| 73 | + |
| 74 | + replacement = { |
| 75 | + ENDPOINTS: { |
| 76 | + 11: { |
| 77 | + PROFILE_ID: zha.PROFILE_ID, |
| 78 | + DEVICE_TYPE: zha.DeviceType.EXTENDED_COLOR_LIGHT, |
| 79 | + INPUT_CLUSTERS: [ |
| 80 | + Basic.cluster_id, |
| 81 | + Identify.cluster_id, |
| 82 | + Groups.cluster_id, |
| 83 | + Scenes.cluster_id, |
| 84 | + OnOff.cluster_id, |
| 85 | + LevelControl.cluster_id, |
| 86 | + Color.cluster_id, |
| 87 | + LightLink.cluster_id, |
| 88 | + 64513, |
| 89 | + PhilipsEffectCluster, |
| 90 | + ], |
| 91 | + OUTPUT_CLUSTERS: [Ota.cluster_id], |
| 92 | + }, |
| 93 | + 242: { |
| 94 | + PROFILE_ID: 41440, |
| 95 | + DEVICE_TYPE: 97, |
| 96 | + INPUT_CLUSTERS: [], |
| 97 | + OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id], |
| 98 | + }, |
| 99 | + } |
| 100 | + } |
0 commit comments