Write value to ESPHome modbus server

Hi. I made an ESPHome modbus RTU slave device, and i can read holding register values with an external client. But how is possible to write to this register? Can’t figure out. Here is my config:

number:
  - platform: template
    name: "slider"
    id: slider
    optimistic: true
    min_value: 0
    max_value: 200
    step: 1   
    
uart:
  - id: intmodbus
    tx_pin: 21
    rx_pin: 20
    baud_rate: 9600
    stop_bits: 1
    data_bits: 8
    parity: NONE
    debug:
      direction: BOTH

modbus:
  uart_id: intmodbus
  id: modbus_server
  role: server
  flow_control_pin: 5  

modbus_controller:
  - modbus_id: modbus_server
    address: 1
    server_registers:
      - address: 1
        value_type: S_WORD
        read_lambda: |-
          return id(slider).state; 

Documentation doesn’t give any function for that.
I’m pretty sure you have better chances for help on Discord.
If you find answer, remember to update here.

There is active development for this capability on discord.

Try GitHub - gotnone/esphome at server_write_registers as an external_component. You will need to grab the components [core, modbus, modbus_controller]