forked from Koenkk/zigbee-herdsman-converters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cr_smart_home.js
60 lines (59 loc) · 2.07 KB
/
cr_smart_home.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
const exposes = require('../lib/exposes');
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
const extend = require('../lib/extend');
const e = exposes.presets;
module.exports = [
{
fingerprint: [{modelID: 'TS0202', manufacturerName: '_TYZB01_jytabjkb'}],
model: 'TS0202_CR',
vendor: 'CR Smart Home',
description: 'Motion sensor',
// Requires alarm_1_with_timeout https://github.com/Koenkk/zigbee2mqtt/issues/2818#issuecomment-776119586
fromZigbee: [fz.ias_occupancy_alarm_1_with_timeout, fz.battery, fz.ignore_basic_report],
toZigbee: [],
exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()],
},
{
zigbeeModel: ['TS0204'],
model: 'TS0204',
vendor: 'CR Smart Home',
description: 'Gas sensor',
fromZigbee: [fz.ias_gas_alarm_1, fz.battery, fz.ignore_basic_report],
toZigbee: [],
exposes: [e.gas(), e.battery_low(), e.tamper(), e.battery()],
},
{
zigbeeModel: ['TS0205'],
model: 'TS0205',
vendor: 'CR Smart Home',
description: 'Smoke sensor',
fromZigbee: [fz.ias_smoke_alarm_1, fz.battery, fz.ignore_basic_report],
toZigbee: [],
exposes: [e.smoke(), e.battery_low(), e.tamper(), e.battery()],
},
{
zigbeeModel: ['TS0111'],
model: 'TS0111',
vendor: 'CR Smart Home',
description: 'Socket',
extend: extend.switch(),
},
{
zigbeeModel: ['TS0207', 'FNB54-WTS08ML1.0'],
model: 'TS0207',
vendor: 'CR Smart Home',
description: 'Water leak detector',
fromZigbee: [fz.ias_water_leak_alarm_1, fz.battery],
toZigbee: [],
exposes: [e.water_leak(), e.battery_low(), e.tamper(), e.battery()],
},
{
zigbeeModel: ['TS0218'],
model: 'TS0218',
vendor: 'CR Smart Home',
description: 'Button',
fromZigbee: [fz.legacy.TS0218_click, fz.battery],
exposes: [e.battery(), e.action(['click'])],
toZigbee: [],
},
];