Skip to content

Commit

Permalink
feat(add): SP02-ZB001 (#6234)
Browse files Browse the repository at this point in the history
* Add SP02-ZB001 Infrared Motion Sensor from iAlarm

* Update tuya.ts

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
  • Loading branch information
bdavis2-PCTY and Koenkk committed Oct 5, 2023
1 parent 851fe33 commit 7fa9429
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6324,6 +6324,24 @@ const definitions: Definition[] = [
],
},
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_mgxy2d9f']),
model: 'SP02-ZB001',
vendor: 'iAlarm',
description: 'Infrared motion sensor',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
onEvent: tuya.onEventSetTime,
configure: tuya.configureMagicPacket,
exposes: [e.tamper(), e.battery(), e.occupancy()],
meta: {
tuyaDatapoints: [
[1, 'occupancy', tuya.valueConverter.trueFalse0],
[4, 'battery', tuya.valueConverter.raw],
[5, 'tamper', tuya.valueConverter.raw],
],
},
},
];

module.exports = definitions;

0 comments on commit 7fa9429

Please sign in to comment.