-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Open
Description
Similarly to: #6207
Original PR I found: #10707
My fingerbot plus reports as a rocker. I have tried and very much failed to create the externalConverter, I keep on making it invalid even though I took inspiration from the ones I found online. I found the code in the repo for the fingerprint bot and tried to use that but to no success. Here is the last version I wrote. If you can point me in the right direction I can test it to see if it works. The new code is _TZ3210_a04acm9s
import * as m from 'zigbee-herdsman-converters/lib/modernExtend';
import * as fz from 'zigbee-herdsman-converters/converters/fromZigbee';
import * as tz from 'zigbee-herdsman-converters/converters/toZigbee';
import * as exposes from 'zigbee-herdsman-converters/lib/exposes';
import * as reporting from 'zigbee-herdsman-converters/lib/reporting';
import * as ota from 'zigbee-herdsman-converters/lib/ota';
import * as utils from 'zigbee-herdsman-converters/lib/utils';
import * as globalStore from 'zigbee-herdsman-converters/lib/store';
import * as tuya from "zigbee-herdsman-converters/lib/tuya";
export default {
fingerprint: tuya.fingerprint("TS0001", ["_TZ3210_a04acm9s"]),
model: "TS0001_fingerbot",
vendor: "Tuya",
description: "Zigbee fingerbot plus",
whiteLabel: [tuya.whitelabel("Adaprox", "TS0001_fingerbot_1", "Zigbee fingerbot plus", ["_TZ3210_dse8ogfy"])],
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
extend: [tuya.modernExtend.tuyaBase({dp: true})],
exposes: [
e.switch(),
e.battery(),
e.enum("mode", ea.STATE_SET, ["click", "switch", "program"]).withDescription("Working mode"),
e.numeric("lower", ea.STATE_SET).withValueMin(50).withValueMax(100).withValueStep(1).withUnit("%").withDescription("Down movement limit"),
e.numeric("upper", ea.STATE_SET).withValueMin(0).withValueMax(50).withValueStep(1).withUnit("%").withDescription("Up movement limit"),
e.numeric("delay", ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit("s").withDescription("Sustain time"),
e.binary("reverse", ea.STATE_SET, "ON", "OFF").withDescription("Reverse"),
e.binary("touch", ea.STATE_SET, "ON", "OFF").withDescription("Touch control"),
],
configure: async (device, coordinatorEndpoint) => {
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ["genOnOff"]);
},
meta: {
tuyaSendCommand: "sendData",
tuyaDatapoints: [
[
0x65,
"mode",
tuya.valueConverterBasic.lookup({
click: tuya.enum(0),
switch: tuya.enum(1),
program: tuya.enum(2),
}),
],
[0x66, "lower", tuya.valueConverter.raw],
[0x67, "delay", tuya.valueConverter.raw],
[
0x68,
"reverse",
tuya.valueConverterBasic.lookup({
ON: tuya.enum(1),
OFF: tuya.enum(0),
}),
],
[0x69, "battery", tuya.valueConverter.raw],
[0x6a, "upper", tuya.valueConverter.raw],
[0x6b, "touch", tuya.valueConverterBasic.lookup({ON: true, OFF: false})],
// ? [0x6c, '', tuya.valueConverter.onOff],
[0x6d, "program", tuya.valueConverter.raw],
// ? [0x70, '', tuya.valueConverter.raw],
],
},
};
no-longer-human
Metadata
Metadata
Assignees
Labels
No labels