Created
May 19, 2025 01:25
-
-
Save therealcmj/4eca0e3a50562d935b23d56c9cf94bbf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Tuya based cover and blinds.""" | |
| from zigpy.profiles import zha | |
| from zigpy.zcl.clusters.general import Basic, Groups, Identify, OnOff, Ota, Scenes, Time | |
| from zhaquirks.const import ( | |
| DEVICE_TYPE, | |
| ENDPOINTS, | |
| INPUT_CLUSTERS, | |
| MODELS_INFO, | |
| OUTPUT_CLUSTERS, | |
| PROFILE_ID, | |
| ) | |
| from zhaquirks.tuya import ( | |
| TuyaManufacturerWindowCover, | |
| TuyaManufCluster, | |
| TuyaWindowCover, | |
| TuyaWindowCoverControl, | |
| ) | |
| class TuyaZemismartSmartCover0601_3cmj(TuyaWindowCover): | |
| """Tuya Zemismart blind cover motor.""" | |
| signature = { | |
| # "node_descriptor": "<NodeDescriptor byte1=1 byte2=64 mac_capability_flags=142 manufacturer_code=4098 | |
| # maximum_buffer_size=82 maximum_incoming_transfer_size=82 server_mask=11264 | |
| # maximum_outgoing_transfer_size=82 descriptor_capability_field=0>", | |
| # input_clusters=[0x0000, 0x0004, 0x0005, 0x000a, 0xef00] | |
| # output_clusters=[0x0019] | |
| # <SimpleDescriptor endpoint=1 profile=260 device_type=51 input_clusters=[0, 4, 5, 61184] output_clusters=[25]> | |
| MODELS_INFO: [ | |
| ("_TZE200_yia0p3tr", "TS0601"), | |
| ], | |
| ENDPOINTS: { | |
| 1: { | |
| PROFILE_ID: zha.PROFILE_ID, | |
| DEVICE_TYPE: zha.DeviceType.SMART_PLUG, | |
| INPUT_CLUSTERS: [ | |
| Basic.cluster_id, | |
| Groups.cluster_id, | |
| Scenes.cluster_id, | |
| TuyaManufCluster.cluster_id, | |
| ], | |
| OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id], | |
| }, | |
| 242: { | |
| 'profile_id': 41440, | |
| 'device_type': 97, | |
| 'input_clusters': [], | |
| 'output_clusters': [ | |
| 33 | |
| ] | |
| } | |
| }, | |
| } | |
| replacement = { | |
| ENDPOINTS: { | |
| 1: { | |
| DEVICE_TYPE: zha.DeviceType.WINDOW_COVERING_DEVICE, | |
| INPUT_CLUSTERS: [ | |
| Basic.cluster_id, | |
| Groups.cluster_id, | |
| Scenes.cluster_id, | |
| TuyaManufacturerWindowCover, | |
| TuyaWindowCoverControl, | |
| ], | |
| OUTPUT_CLUSTERS: [Ota.cluster_id], | |
| }, | |
| }, | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment