Skip to content

Commit 8125d01

Browse files
committed
Add On/Off platform event
1 parent 05f94d4 commit 8125d01

File tree

49 files changed

+2739
-80
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2739
-80
lines changed

tests/data/devices/awox-tlsr82xx.json

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,47 @@
200200
}
201201
],
202202
"event": [
203+
{
204+
"info_object": {
205+
"fallback_name": null,
206+
"unique_id": "a4:c1:38:01:9c:d6:df:d1-1-6",
207+
"migrate_unique_ids": [],
208+
"platform": "event",
209+
"class_name": "OnOffEvent",
210+
"translation_key": "on_off",
211+
"translation_placeholders": null,
212+
"device_class": null,
213+
"state_class": null,
214+
"entity_category": null,
215+
"entity_registry_enabled_default": true,
216+
"enabled": true,
217+
"primary": false,
218+
"cluster_handlers": [
219+
{
220+
"class_name": "OnOffClientClusterHandler",
221+
"generic_id": "cluster_handler_0x0006_client",
222+
"endpoint_id": 1,
223+
"cluster": {
224+
"id": 6,
225+
"name": "On/Off",
226+
"type": "client"
227+
},
228+
"id": "1:0x0006_client",
229+
"unique_id": "a4:c1:38:01:9c:d6:df:d1:1:0x0006_CLIENT",
230+
"status": "INITIALIZED",
231+
"value_attribute": null
232+
}
233+
],
234+
"device_ieee": "a4:c1:38:01:9c:d6:df:d1",
235+
"endpoint_id": 1,
236+
"available": true,
237+
"group_id": null
238+
},
239+
"state": {
240+
"class_name": "OnOffEvent",
241+
"available": true
242+
}
243+
},
203244
{
204245
"info_object": {
205246
"fallback_name": null,
@@ -214,7 +255,7 @@
214255
"entity_category": null,
215256
"entity_registry_enabled_default": true,
216257
"enabled": true,
217-
"primary": true,
258+
"primary": false,
218259
"cluster_handlers": [
219260
{
220261
"class_name": "LevelControlClientClusterHandler",

tests/data/devices/ewelink-snzb-01p.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,49 @@
188188
}
189189
}
190190
],
191+
"event": [
192+
{
193+
"info_object": {
194+
"fallback_name": null,
195+
"unique_id": "84:ba:20:ff:fe:d2:41:fe-1-6",
196+
"migrate_unique_ids": [],
197+
"platform": "event",
198+
"class_name": "OnOffEvent",
199+
"translation_key": "on_off",
200+
"translation_placeholders": null,
201+
"device_class": null,
202+
"state_class": null,
203+
"entity_category": null,
204+
"entity_registry_enabled_default": true,
205+
"enabled": true,
206+
"primary": true,
207+
"cluster_handlers": [
208+
{
209+
"class_name": "OnOffClientClusterHandler",
210+
"generic_id": "cluster_handler_0x0006_client",
211+
"endpoint_id": 1,
212+
"cluster": {
213+
"id": 6,
214+
"name": "On/Off",
215+
"type": "client"
216+
},
217+
"id": "1:0x0006_client",
218+
"unique_id": "84:ba:20:ff:fe:d2:41:fe:1:0x0006_CLIENT",
219+
"status": "INITIALIZED",
220+
"value_attribute": null
221+
}
222+
],
223+
"device_ieee": "84:ba:20:ff:fe:d2:41:fe",
224+
"endpoint_id": 1,
225+
"available": true,
226+
"group_id": null
227+
},
228+
"state": {
229+
"class_name": "OnOffEvent",
230+
"available": true
231+
}
232+
}
233+
],
191234
"sensor": [
192235
{
193236
"info_object": {

tests/data/devices/ewelink-wb01.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,49 @@
159159
}
160160
}
161161
],
162+
"event": [
163+
{
164+
"info_object": {
165+
"fallback_name": null,
166+
"unique_id": "00:12:4b:00:25:12:e0:f9-1-6",
167+
"migrate_unique_ids": [],
168+
"platform": "event",
169+
"class_name": "OnOffEvent",
170+
"translation_key": "on_off",
171+
"translation_placeholders": null,
172+
"device_class": null,
173+
"state_class": null,
174+
"entity_category": null,
175+
"entity_registry_enabled_default": true,
176+
"enabled": true,
177+
"primary": true,
178+
"cluster_handlers": [
179+
{
180+
"class_name": "OnOffClientClusterHandler",
181+
"generic_id": "cluster_handler_0x0006_client",
182+
"endpoint_id": 1,
183+
"cluster": {
184+
"id": 6,
185+
"name": "On/Off",
186+
"type": "client"
187+
},
188+
"id": "1:0x0006_client",
189+
"unique_id": "00:12:4b:00:25:12:e0:f9:1:0x0006_CLIENT",
190+
"status": "INITIALIZED",
191+
"value_attribute": null
192+
}
193+
],
194+
"device_ieee": "00:12:4b:00:25:12:e0:f9",
195+
"endpoint_id": 1,
196+
"available": true,
197+
"group_id": null
198+
},
199+
"state": {
200+
"class_name": "OnOffEvent",
201+
"available": true
202+
}
203+
}
204+
],
162205
"sensor": [
163206
{
164207
"info_object": {

tests/data/devices/hobeian-zg-101zl.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,47 @@
391391
}
392392
],
393393
"event": [
394+
{
395+
"info_object": {
396+
"fallback_name": null,
397+
"unique_id": "ab:cd:ef:12:41:15:95:9c-1-6",
398+
"migrate_unique_ids": [],
399+
"platform": "event",
400+
"class_name": "OnOffEvent",
401+
"translation_key": "on_off",
402+
"translation_placeholders": null,
403+
"device_class": null,
404+
"state_class": null,
405+
"entity_category": null,
406+
"entity_registry_enabled_default": true,
407+
"enabled": true,
408+
"primary": false,
409+
"cluster_handlers": [
410+
{
411+
"class_name": "OnOffClientClusterHandler",
412+
"generic_id": "cluster_handler_0x0006_client",
413+
"endpoint_id": 1,
414+
"cluster": {
415+
"id": 6,
416+
"name": "On/Off",
417+
"type": "client"
418+
},
419+
"id": "1:0x0006_client",
420+
"unique_id": "ab:cd:ef:12:41:15:95:9c:1:0x0006_CLIENT",
421+
"status": "INITIALIZED",
422+
"value_attribute": null
423+
}
424+
],
425+
"device_ieee": "ab:cd:ef:12:41:15:95:9c",
426+
"endpoint_id": 1,
427+
"available": true,
428+
"group_id": null
429+
},
430+
"state": {
431+
"class_name": "OnOffEvent",
432+
"available": true
433+
}
434+
},
394435
{
395436
"info_object": {
396437
"fallback_name": null,

tests/data/devices/ikea-of-sweden-parasoll-door-window-sensor.json

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
"entity_category": null,
236236
"entity_registry_enabled_default": true,
237237
"enabled": true,
238-
"primary": true,
238+
"primary": false,
239239
"cluster_handlers": [
240240
{
241241
"class_name": "IASZoneClusterHandler",
@@ -313,6 +313,49 @@
313313
}
314314
}
315315
],
316+
"event": [
317+
{
318+
"info_object": {
319+
"fallback_name": null,
320+
"unique_id": "04:87:27:ff:fe:4a:b3:25-1-6",
321+
"migrate_unique_ids": [],
322+
"platform": "event",
323+
"class_name": "OnOffEvent",
324+
"translation_key": "on_off",
325+
"translation_placeholders": null,
326+
"device_class": null,
327+
"state_class": null,
328+
"entity_category": null,
329+
"entity_registry_enabled_default": true,
330+
"enabled": true,
331+
"primary": true,
332+
"cluster_handlers": [
333+
{
334+
"class_name": "OnOffClientClusterHandler",
335+
"generic_id": "cluster_handler_0x0006_client",
336+
"endpoint_id": 1,
337+
"cluster": {
338+
"id": 6,
339+
"name": "On/Off",
340+
"type": "client"
341+
},
342+
"id": "1:0x0006_client",
343+
"unique_id": "04:87:27:ff:fe:4a:b3:25:1:0x0006_CLIENT",
344+
"status": "INITIALIZED",
345+
"value_attribute": null
346+
}
347+
],
348+
"device_ieee": "04:87:27:ff:fe:4a:b3:25",
349+
"endpoint_id": 1,
350+
"available": true,
351+
"group_id": null
352+
},
353+
"state": {
354+
"class_name": "OnOffEvent",
355+
"available": true
356+
}
357+
}
358+
],
316359
"sensor": [
317360
{
318361
"info_object": {

tests/data/devices/ikea-of-sweden-remote-control-n2.json

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,47 @@
195195
}
196196
],
197197
"event": [
198+
{
199+
"info_object": {
200+
"fallback_name": null,
201+
"unique_id": "ab:cd:ef:12:6b:e7:d0:70-1-6",
202+
"migrate_unique_ids": [],
203+
"platform": "event",
204+
"class_name": "OnOffEvent",
205+
"translation_key": "on_off",
206+
"translation_placeholders": null,
207+
"device_class": null,
208+
"state_class": null,
209+
"entity_category": null,
210+
"entity_registry_enabled_default": true,
211+
"enabled": true,
212+
"primary": false,
213+
"cluster_handlers": [
214+
{
215+
"class_name": "OnOffClientClusterHandler",
216+
"generic_id": "cluster_handler_0x0006_client",
217+
"endpoint_id": 1,
218+
"cluster": {
219+
"id": 6,
220+
"name": "On/Off",
221+
"type": "client"
222+
},
223+
"id": "1:0x0006_client",
224+
"unique_id": "ab:cd:ef:12:6b:e7:d0:70:1:0x0006_CLIENT",
225+
"status": "INITIALIZED",
226+
"value_attribute": null
227+
}
228+
],
229+
"device_ieee": "ab:cd:ef:12:6b:e7:d0:70",
230+
"endpoint_id": 1,
231+
"available": true,
232+
"group_id": null
233+
},
234+
"state": {
235+
"class_name": "OnOffEvent",
236+
"available": true
237+
}
238+
},
198239
{
199240
"info_object": {
200241
"fallback_name": null,
@@ -209,7 +250,7 @@
209250
"entity_category": null,
210251
"entity_registry_enabled_default": true,
211252
"enabled": true,
212-
"primary": true,
253+
"primary": false,
213254
"cluster_handlers": [
214255
{
215256
"class_name": "LevelControlClientClusterHandler",

tests/data/devices/ikea-of-sweden-rodret-dimmer.json

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,47 @@
244244
}
245245
],
246246
"event": [
247+
{
248+
"info_object": {
249+
"fallback_name": null,
250+
"unique_id": "5c:c7:c1:ff:fe:cc:19:d9-1-6",
251+
"migrate_unique_ids": [],
252+
"platform": "event",
253+
"class_name": "OnOffEvent",
254+
"translation_key": "on_off",
255+
"translation_placeholders": null,
256+
"device_class": null,
257+
"state_class": null,
258+
"entity_category": null,
259+
"entity_registry_enabled_default": true,
260+
"enabled": true,
261+
"primary": false,
262+
"cluster_handlers": [
263+
{
264+
"class_name": "OnOffClientClusterHandler",
265+
"generic_id": "cluster_handler_0x0006_client",
266+
"endpoint_id": 1,
267+
"cluster": {
268+
"id": 6,
269+
"name": "On/Off",
270+
"type": "client"
271+
},
272+
"id": "1:0x0006_client",
273+
"unique_id": "5c:c7:c1:ff:fe:cc:19:d9:1:0x0006_CLIENT",
274+
"status": "INITIALIZED",
275+
"value_attribute": null
276+
}
277+
],
278+
"device_ieee": "5c:c7:c1:ff:fe:cc:19:d9",
279+
"endpoint_id": 1,
280+
"available": true,
281+
"group_id": null
282+
},
283+
"state": {
284+
"class_name": "OnOffEvent",
285+
"available": true
286+
}
287+
},
247288
{
248289
"info_object": {
249290
"fallback_name": null,
@@ -258,7 +299,7 @@
258299
"entity_category": null,
259300
"entity_registry_enabled_default": true,
260301
"enabled": true,
261-
"primary": true,
302+
"primary": false,
262303
"cluster_handlers": [
263304
{
264305
"class_name": "LevelControlClientClusterHandler",

0 commit comments

Comments
 (0)