Skip to content

Commit e7534cc

Browse files
committed
Add bindings and state/tempered
1 parent 5cd6388 commit e7534cc

File tree

3 files changed

+72
-21
lines changed

3 files changed

+72
-21
lines changed

devices/fireangel/co_alarm.json

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@
5757
{
5858
"name": "attr/uniqueid"
5959
},
60-
{
61-
"name": "attr/zonetype"
62-
},
6360
{
6461
"name": "cap/groups/not_supported"
6562
},
@@ -149,8 +146,15 @@
149146
"ep": "0x01",
150147
"cl": "0x0001",
151148
"at": "0x0020",
152-
"eval": "Item.val = Math.round(9.09090909 * (Attr.val - 19))"
153-
}
149+
"script": "0001_battery_voltage.js"
150+
},
151+
"read": {
152+
"fn": "zcl:attr",
153+
"ep": "0x01",
154+
"cl": "0x0001",
155+
"at": "0x0020"
156+
},
157+
"refresh.interval": 43260
154158
},
155159
{
156160
"name": "config/enrolled"
@@ -180,10 +184,25 @@
180184
{
181185
"name": "state/lowbattery"
182186
},
187+
{
188+
"name": "state/tampered"
189+
},
183190
{
184191
"name": "state/test"
185192
}
186193
]
187194
}
195+
],
196+
"bindings": [
197+
{
198+
"bind": "unicast",
199+
"src.ep": "0x01",
200+
"cl": "0x0500"
201+
},
202+
{
203+
"bind": "unicast",
204+
"src.ep": "0x01",
205+
"cl": "0x0001"
206+
}
188207
]
189208
}

devices/fireangel/generic_alarm.json

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@
5757
{
5858
"name": "attr/uniqueid"
5959
},
60-
{
61-
"name": "attr/zonetype"
62-
},
6360
{
6461
"name": "cap/groups/not_supported"
6562
},
@@ -140,17 +137,21 @@
140137
{
141138
"name": "attr/uniqueid"
142139
},
143-
{
144-
"name": "attr/zonetype"
145-
},
146140
{
147141
"name": "config/battery",
148142
"parse": {
149143
"ep": "0x01",
150144
"cl": "0x0001",
151145
"at": "0x0020",
152-
"eval": "Item.val = Math.round(9.09090909 * (Attr.val - 19))"
153-
}
146+
"script": "0001_battery_voltage.js"
147+
},
148+
"read": {
149+
"fn": "zcl:attr",
150+
"ep": "0x01",
151+
"cl": "0x0001",
152+
"at": "0x0020"
153+
},
154+
"refresh.interval": 43260
154155
},
155156
{
156157
"name": "config/enrolled"
@@ -180,10 +181,25 @@
180181
{
181182
"name": "state/lowbattery"
182183
},
184+
{
185+
"name": "state/tampered"
186+
},
183187
{
184188
"name": "state/test"
185189
}
186190
]
187191
}
192+
],
193+
"bindings": [
194+
{
195+
"bind": "unicast",
196+
"src.ep": "0x01",
197+
"cl": "0x0500"
198+
},
199+
{
200+
"bind": "unicast",
201+
"src.ep": "0x01",
202+
"cl": "0x0001"
203+
}
188204
]
189205
}

devices/fireangel/smoke_alarm.json

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@
5757
{
5858
"name": "attr/uniqueid"
5959
},
60-
{
61-
"name": "attr/zonetype"
62-
},
6360
{
6461
"name": "cap/groups/not_supported"
6562
},
@@ -140,17 +137,21 @@
140137
{
141138
"name": "attr/uniqueid"
142139
},
143-
{
144-
"name": "attr/zonetype"
145-
},
146140
{
147141
"name": "config/battery",
148142
"parse": {
149143
"ep": "0x01",
150144
"cl": "0x0001",
151145
"at": "0x0020",
152-
"eval": "Item.val = Math.round(9.09090909 * (Attr.val - 19))"
153-
}
146+
"script": "0001_battery_voltage.js"
147+
},
148+
"read": {
149+
"fn": "zcl:attr",
150+
"ep": "0x01",
151+
"cl": "0x0001",
152+
"at": "0x0020"
153+
},
154+
"refresh.interval": 43260
154155
},
155156
{
156157
"name": "config/enrolled"
@@ -180,10 +181,25 @@
180181
{
181182
"name": "state/lowbattery"
182183
},
184+
{
185+
"name": "state/tampered"
186+
},
183187
{
184188
"name": "state/test"
185189
}
186190
]
187191
}
192+
],
193+
"bindings": [
194+
{
195+
"bind": "unicast",
196+
"src.ep": "0x01",
197+
"cl": "0x0500"
198+
},
199+
{
200+
"bind": "unicast",
201+
"src.ep": "0x01",
202+
"cl": "0x0001"
203+
}
188204
]
189205
}

0 commit comments

Comments
 (0)