Zigbee2mqtt - Help to add a feature to an already supported device

Hi,

I would really appreciate some help to add a feature to an already supported device on zigbee2mqtt. I already know the basics of external converters and how to use and test them in z2m but i’m a novice in coding. I can’t really find any documentation neither to learn how to code what I want, asked for help on github and unfortunately no one replied.

I want to add an ‘‘enum’’ in the expose tab of my device to control a manufacturer specific attribute. I already added the attribute to the ZCL of z2m so i’m now able to read and write data to it from the dev console (after a recent update of z2m) and confirmed that the feature I want exist and can indeed be controlled with this attribute.

What I would like is an ‘‘enum’’ in the expose tab of my device (so the associated entity in HA) with 2 options: 0 or 45. When 0 is selected, the value ‘‘0’’ must be written to the attribute. When selecting ‘‘45’’, the value ‘‘45’’ must be written to the attribute. Also need the enum status to reflect the current value of the attribute, which is defaulted to 45 by the manufacturer, if this matters.

The attribute in question is called drConfigWaterTempMin (0x0076) from the manuSpecificSinope cluster (0xff01)
This attribute control a safety feature that will automatically kick back the heater element of a water heater if the water temperature goes below 45 Celsius. When set at 0, the safety feature is disabled. Here is the device converter for that device from zigbee-herdsman-converters/src/device/sinope.js

    {
        zigbeeModel: ['RM3500ZB'],
        model: 'RM3500ZB',
        vendor: 'Sinopé',
        description: 'Calypso smart water heater controller',
        fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fzLocal.ias_water_leak_alarm,
            fzLocal.sinope, fz.temperature],
        toZigbee: [tz.on_off],
        exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy(), e.water_leak(), e.temperature()],
        configure: async (device, coordinatorEndpoint) => {
            const endpoint = device.getEndpoint(1);
            const binds = ['genOnOff', 'haElectricalMeasurement', 'seMetering', 'msTemperatureMeasurement', 'ssIasZone',
                'manuSpecificSinope'];
            await reporting.bind(endpoint, coordinatorEndpoint, binds);
            await reporting.onOff(endpoint);
            await reporting.temperature(endpoint, {min: 10, max: 301, change: 10}); // divider 100: 0.1C
            await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
            await reporting.activePower(endpoint, {min: 10, max: 305, change: 2}); // divider 1 : 2W
            await reporting.rmsCurrent(endpoint, {min: 10, max: 306, change: 10}); // divider 1000: 0.01Arms
            await reporting.rmsVoltage(endpoint, {min: 10, max: 307, change: 1}); // divider 1: 1Vrms
            await reporting.readMeteringMultiplierDivisor(endpoint);
            await reporting.currentSummDelivered(endpoint, {min: 10, max: 303, change: [10, 10]}); // divider 1000: 0,01kWh

            await endpoint.configureReporting('ssIasZone', [{attribute: 'zoneStatus', minimumReportInterval: 1,
                maximumReportInterval: constants.repInterval.HOUR, reportableChange: 1}]);
        },
    },

And here is the attribute in question recently added to zigbee-herdsman/cluster.ts that now allows me to use the dev console to read/write to it:

Any idea what I need to add to the device converter in order to do what I want?

Thanks for your help