Hello.
I know how to fix that with Zigbee2MQTT, perhaps you can do the same in ZHA.
In Z2M you need to add external converters, that off battery reporting and add tuya magic.
Next steps is for Z2M
- Create file called tuya44.js (must be .js extension) in config/zigbee2mqtt folder, near configuration.yaml
- For TS0044 use following
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['TS0044'],
fingerprint: [{manufacturerName: '_TZ3000_tk3s5tyg'}],
model: 'TS0044',
vendor: 'TuYa',
description: 'Wireless switch with 4 buttons (custom)',
whiteLabel: [{vendor: 'Lonsonho', model: 'TS0044'}, {vendor: 'Haozee', model: 'ESW-OZAA-EU'}, {vendor: 'LoraTap', model: 'SS6400ZB'}],
fromZigbee: [fz.tuya_on_off_action, fz.battery],
exposes: [e.battery(), e.action(['1_single', '1_double', '1_hold', '2_single', '2_double', '2_hold', '3_single', '3_double', '3_hold', '4_single', '4_double', '4_hold'])],
toZigbee: [],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await endpoint.read('genBasic', [0x0004, 0x000, 0x0001, 0x0005, 0x0007, 0xfffe]);
await endpoint.write('genBasic', {0xffde: {value: 0x13, type: 0x20}});
},
};
module.exports = definition;
- In configuration.yaml add
external_converters:
- tuya44.js
- Restart Zigbee2MQTT
- Re-pair your device