New custom_command like modbus function in HA

How could HA modbus be used in a similar fashion as esphome modbus custom_command functions?

I have this functioning esphome custom_command function call:

sensor:

* platform: modbus_controller
id: dvi_comp_hours
modbus_controller_id: dvi
name: "Køretimer kompressor"
custom_command: [0x10, 0x06, 0x00, 0xA1, 0x00, 0x34, 0xDA, 0xBE]
register_count: 1
value_type: U_WORD
accuracy_decimals: 0
state_class: total_increasing
lambda: |-
// Extract the third & fourth byte combined
uint16_t combined_value = (data[2] << 8) | data[3];
// Parse the combined decimal value to the sensor entity
return combined_value;

The significance is that I use modbus FC0x06 to read certain registers using the FC0x06 register’s address + 0x100

In HA the there is presently not a similar way to issue a custom modbus function call, and using the standard implementation of FC0x06 ignores the response echo from the modbus slave. It is also noted that in this case where I read using FC0x06 the content of the address by writing a dummy value to (address+0x100), the response echo from this write function comes from the register address rather than (address+0x100).
In esphome custom command this is irrelevant as I only extract the 3rd and 4th byte to read the register value and parse that to the sensor.

Adding a custom_command function to HA would greatly add some useful flexibility to communicate with modbus slaves which are not compliant to the modbus specification.