Skip to content

Conversation

@brodock
Copy link
Contributor

@brodock brodock commented Sep 14, 2025

Link to picture pull request: Koenkk/zigbee2mqtt.io#4151

External Definition for reference:

import * as m from 'zigbee-herdsman-converters/lib/modernExtend';

export default {
    zigbeeModel: ['TS0002'],
    model: 'TS0002',
    vendor: '_TZ3000_5ksufhqi',
    description: 'Automatically generated definition',
    extend: [m.deviceEndpoints({"endpoints":{"1":1,"2":2}}), m.onOff({"powerOnBehavior":false,"endpointNames":["1","2"]})],
    meta: {"multiEndpoint":true},
};

External device for reference:

import * as reporting from "zigbee-herdsman-converters/lib/reporting";
import * as tuya from "zigbee-herdsman-converters/lib/tuya";

const definition = {
  fingerprint: tuya.fingerprint("TS0002", ["_TZ3000_5ksufhqi"]),
  model: "FZB-2",
  vendor: "Nova Digital",
  description: "2-Gang switch with backlight, countdown and inching",
  extend: [
      tuya.modernExtend.tuyaOnOff({
          switchType: true,
          powerOnBehavior2: true,
          backlightModeOffOn: true,
          indicatorMode: true,
          onOffCountdown: true,
          inchingSwitch: true,
          endpoints: ["l1", "l2"],
      }),
      tuya.clusters.addTuyaCommonPrivateCluster(),
  ],
  endpoint: (device) => {
      return {l1: 1, l2: 2};
  },
  meta: {multiEndpoint: true},
  configure: async (device, coordinatorEndpoint) => {
      await tuya.configureMagicPacket(device, coordinatorEndpoint);
      await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ["genOnOff"]);
      await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ["genOnOff"]);
  },
};

export default definition;

I've added as an whitelabel for the existing TS0002 version with all functionality

@Koenkk Koenkk merged commit f7b8c64 into Koenkk:master Sep 14, 2025
3 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Sep 14, 2025

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants