Skip to content

Commit b052677

Browse files
authored
DDF for Tuya Motion Sensor TS0601 (_TZE200_bh3n6gk8) (#8305)
1 parent 92e28bd commit b052677

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"schema": "devcap1.schema.json",
3+
"manufacturername": [
4+
"_TZE200_1ibpyhdc",
5+
"_TZE200_bh3n6gk8"
6+
],
7+
"modelid": [
8+
"TS0601",
9+
"TS0601"
10+
],
11+
"vendor": "Tuya",
12+
"product": "PIR motion detector (ZG-204ZL)",
13+
"status": "Gold",
14+
"sleeper": true,
15+
"subdevices": [
16+
{
17+
"type": "$TYPE_PRESENCE_SENSOR",
18+
"restapi": "/sensors",
19+
"uuid": [
20+
"$address.ext",
21+
"0x01",
22+
"0x0406"
23+
],
24+
"items": [
25+
{
26+
"name": "attr/lastseen"
27+
},
28+
{
29+
"name": "attr/manufacturername"
30+
},
31+
{
32+
"name": "attr/modelid"
33+
},
34+
{
35+
"name": "attr/name"
36+
},
37+
{
38+
"name": "attr/swversion",
39+
"parse": {
40+
"fn": "zcl:attr",
41+
"ep": 1,
42+
"cl": "0x0000",
43+
"at": "0x0001",
44+
"script": "tuya_swversion.js"
45+
},
46+
"read": {
47+
"fn": "zcl:attr",
48+
"ep": 1,
49+
"cl": "0x0000",
50+
"at": "0x0001"
51+
}
52+
},
53+
{
54+
"name": "attr/type"
55+
},
56+
{
57+
"name": "attr/uniqueid"
58+
},
59+
{
60+
"name": "config/on"
61+
},
62+
{
63+
"name": "config/reachable"
64+
},
65+
{
66+
"name": "state/presence",
67+
"parse": {
68+
"fn": "tuya",
69+
"dpid": 1,
70+
"eval": "Item.val = Attr.val == 0;"
71+
},
72+
"read": {
73+
"fn": "none"
74+
},
75+
"default": 0
76+
},
77+
{
78+
"name": "config/battery",
79+
"parse": {
80+
"fn": "tuya",
81+
"dpid": 4,
82+
"eval": "Item.val = Attr.val;"
83+
},
84+
"read": {
85+
"fn": "none"
86+
},
87+
"default": 0
88+
},
89+
{
90+
"name": "state/lastupdated"
91+
}
92+
]
93+
}
94+
]
95+
}

0 commit comments

Comments
 (0)