You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I bought a light switch ( 4 gang) of brazilian brand NovaDigital. This device shows unsupported in z2m.
The model looks like a zemismart TB26-4: https://www.zigbee2mqtt.io/devices/TB26-4.html
I was able to add the device creating a converter. I copied the exposes in this case and it works: Koenkk/zigbee2mqtt#20944
Below is the code created:
constfz=require('zigbee-herdsman-converters/converters/fromZigbee');consttz=require('zigbee-herdsman-converters/converters/toZigbee');constexposes=require('zigbee-herdsman-converters/lib/exposes');constreporting=require('zigbee-herdsman-converters/lib/reporting');constextend=require('zigbee-herdsman-converters/lib/extend');constota=require('zigbee-herdsman-converters/lib/ota');consttuya=require('zigbee-herdsman-converters/lib/tuya');const{}=require('zigbee-herdsman-converters/lib/tuya');constutils=require('zigbee-herdsman-converters/lib/utils');constglobalStore=require('zigbee-herdsman-converters/lib/store');conste=exposes.presets;constea=exposes.access;constdefinition={zigbeeModel: ['TS0601'],model: 'TS0601',vendor: '_TZE204_aagrxlbd',description: 'Light Switch',fromZigbee: [tuya.fz.datapoints],toZigbee: [tuya.tz.datapoints],//onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime'configure: tuya.configureMagicPacket,exposes: [// Here you should put all functionality that your device exposestuya.exposes.switch().withEndpoint('l1'),tuya.exposes.switch().withEndpoint('l2'),tuya.exposes.switch().withEndpoint('l3'),tuya.exposes.switch().withEndpoint('l4'),],endpoint: (device)=>{return{'l1': 1,'l2': 1,'l3': 1,'l4': 1};},meta: {// All datapoints go in heremultiEndpoint: true,tuyaDatapoints: [[1,'state_l1',tuya.valueConverter.onOff],[2,'state_l2',tuya.valueConverter.onOff],[3,'state_l3',tuya.valueConverter.onOff],[4,'state_l4',tuya.valueConverter.onOff],],},};module.exports=definition;
Sorry, I'm a noob to this code issue. With this information, is it possible to add the code to z2m for the next updates?
I tried create a pull request, but i received validation error
Thanks!
The text was updated successfully, but these errors were encountered:
I bought a light switch ( 4 gang) of brazilian brand NovaDigital. This device shows unsupported in z2m.
The model looks like a zemismart TB26-4: https://www.zigbee2mqtt.io/devices/TB26-4.html
I was able to add the device creating a converter. I copied the exposes in this case and it works: Koenkk/zigbee2mqtt#20944
Below is the code created:
Sorry, I'm a noob to this code issue. With this information, is it possible to add the code to z2m for the next updates?
I tried create a pull request, but i received validation error
Thanks!
The text was updated successfully, but these errors were encountered: