Mochad Lights come on at full brigthtness level

Hello,

I have just started with HA, after many years with Domoticz.
I have fifteen X10 devices, of which 5 light dimmers.
When HA switches on a light when ON is clicked, it sends:

PL HouseUnit: O12 Func: Ext code 1, data, control Data: 3F Command: 31

to Mochad which “dims” the light to full power.

To switch it off, HA sends:

PL HouseUnit: O12
PL House: O Func: Off

Sending

PL HouseUnit: O12
PL House: O Func: On

Or typing

PL O12 On

directly in Mochad (nc localhost 1099)
would start the light at the previous dim level, which would be much preferable. As it is similar to switching a light off and identical to what HA sends for a X10 switch, it should be a fairly easy modification to make.

How to go about it?

I changed to HA in advance of progressively replacing X10 devices with something Zigbee (principlay because unrelyable ebode blind/curtain switches) but will have dimmers for some time yet.

Thanks for any help in advance
Pete