Zigbee2mqtt state change - Help Please

Hi everyone looking for some help please.
I have just setup Zigbee2mqtt and added my hue bulbs and zigbee switches. I have m-elec stitchy ml-st-r300-nf switchable wall modules installed behind the old wall plate switches. As these stitchy switches are not officially supported I’ve made the external converter .js file based on the basic bulb example provided on the Zigbee2mqtt support page. This allows the switch to turn on & off ok.
My problem is the change of state when the old wall plate switch is turned on or off is not reflected in z2m. I have to manually refresh the state on the expose page for any update to happen.
I must be missing the change of state in the external converter but am unsure of the coding to use. If anyone can help it would be much appreciated.

This is the code in the external converter

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 e = exposes.presets;
const ea = exposes.access;

const definition = {
zigbeeModel: [‘ML-ST-R300-NF’],
model: ‘ML-ST-R300-NF’,
vendor: ‘M-ELEC’,
description: ‘Stitchy Switch’
extend: extend.switch(),

module.exports = definition;

These are the stitchy switches