Skip to content

Commit 94e920c

Browse files
Add Zbeacon DS01 quirk removing PollControl cluster (#2913)
--------- Co-authored-by: TheJulianJES <[email protected]>
1 parent ec898e2 commit 94e920c

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

zhaquirks/zbeacon/__init__.py

Whitespace-only changes.

zhaquirks/zbeacon/doorsensor.py

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
"""Doorsensors"""
2+
3+
from zigpy.profiles import zha
4+
from zigpy.quirks import CustomDevice
5+
from zigpy.zcl.clusters.general import (
6+
Basic,
7+
Identify,
8+
Ota,
9+
PollControl,
10+
PowerConfiguration,
11+
)
12+
from zigpy.zcl.clusters.security import IasZone
13+
14+
from zhaquirks.const import (
15+
DEVICE_TYPE,
16+
ENDPOINTS,
17+
INPUT_CLUSTERS,
18+
MODELS_INFO,
19+
OUTPUT_CLUSTERS,
20+
PROFILE_ID,
21+
)
22+
23+
24+
class DS01DoorSensor(CustomDevice):
25+
"""One of the long rectangular Doorsensors working on 2xAAA
26+
It doesn't correctly implement the PollControl Cluster.
27+
The device will send "PollControl:checkin()" on PollControl cluster,
28+
but doesn't respond when checkin_response is sent after that from the coordinator
29+
30+
The model zbeacon DS01 sounds a lot like ("eWeLink", "DS01") from Sonoff sold as Sonoff SNZB-04
31+
The device tested is sold as Elivco and IHseno IH-MC01 and uses a TuYa ZTU module as described here:
32+
https://github.com/dresden-elektronik/deconz-rest-plugin/issues/7415
33+
"""
34+
35+
signature = {
36+
MODELS_INFO: [("zbeacon", "DS01")],
37+
ENDPOINTS: {
38+
# SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=1026, device_version=0, input_clusters=[0, 3, 1, 1280, 32], output_clusters=[25])
39+
1: {
40+
PROFILE_ID: zha.PROFILE_ID,
41+
DEVICE_TYPE: zha.DeviceType.IAS_ZONE,
42+
INPUT_CLUSTERS: [
43+
Basic.cluster_id,
44+
PowerConfiguration.cluster_id,
45+
Identify.cluster_id,
46+
PollControl.cluster_id,
47+
IasZone.cluster_id,
48+
],
49+
OUTPUT_CLUSTERS: [Ota.cluster_id],
50+
}
51+
},
52+
}
53+
54+
replacement = {
55+
ENDPOINTS: {
56+
1: {
57+
INPUT_CLUSTERS: [
58+
Basic.cluster_id,
59+
PowerConfiguration.cluster_id,
60+
Identify.cluster_id,
61+
IasZone.cluster_id,
62+
],
63+
OUTPUT_CLUSTERS: [
64+
Ota.cluster_id,
65+
],
66+
}
67+
}
68+
}

0 commit comments

Comments
 (0)