From 121edf1bac103aeb1f5e5612afd4a4ed34e37f24 Mon Sep 17 00:00:00 2001 From: koenkk Date: Tue, 19 Sep 2023 19:56:26 +0200 Subject: [PATCH] feat(add): TS0601_pir @Bacchus777 https://github.com/Koenkk/zigbee2mqtt/issues/12883 --- src/devices/tuya.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/devices/tuya.ts b/src/devices/tuya.ts index 83636cc3da755..eaa7dcac6ffe5 100644 --- a/src/devices/tuya.ts +++ b/src/devices/tuya.ts @@ -4649,6 +4649,24 @@ const definitions: Definition[] = [ ], }, }, + { + fingerprint: tuya.fingerprint('TS0601', ['_TZE200_f1pvdgoh']), + model: 'TS0601_pir', + vendor: 'TuYa', + description: 'Haozee PIR sensor', + fromZigbee: [tuya.fz.datapoints], + toZigbee: [tuya.tz.datapoints], + onEvent: tuya.onEvent(), + configure: tuya.configureMagicPacket, + exposes: [e.occupancy(), e.illuminance(), e.battery()], + meta: { + tuyaDatapoints: [ + [1, 'occupancy', tuya.valueConverter.trueFalse0], + [4, 'battery', tuya.valueConverter.raw], + [101, 'illuminance', tuya.valueConverter.raw], + ], + }, + }, { fingerprint: tuya.fingerprint('TS0601', ['_TZE200_8isdky6j']), model: 'ZG-225Z',