Writeable modbus register as entity

I am a newbie (since 3 months) in Home Assistant and please understand that I don’t understand the syntax of Modbus.
The goal is to create Modbus commands as button/switch/toggle that can be used as entity later in an automation.
The device is completely readable:

# SunnyIsland auslesen
modbus:
  - name: Island
    type: tcp
    host: 192.168.1.113
    port: 502
    sensors:
        - name: Ladezustand
          data_type: int32
          unit_of_measurement: '%'
          slave: 3
          address: 30845
          count: 2

… and more sensors → that works great

Now I would like to write. The write cycle contains 3 registers. For this I want to create the definitions.
Are they separate YAML files? Or is it possible to write this is the configuration.yaml? Are they scripts or templates?

It should look something like this:

# first switch
switch:
   - name: AC_Cur_2A
   - service: modbus.write_register
     data:
       hub: Island
       address: 40151
       unit: 3
       value: [0x0000, 0x0802]
       delay: 2
       address: 40755
       unit: 3
       value: [0x0000, 0x07D0]
       delay: 2
       address: 40151
       unit: 3
       value: [0x0000, 0x0803]
	   
# new switch:
switch:
   - name: AC_Cur_6A
   - service: modbus.write_register
     data:
       hub: Island
       address: 40151
       unit: 3
       value: [0x0000, 0x0802]
       delay: 2
       address: 40755
       unit: 3
       value: [0x0000, 0x1770]
       delay: 2
       address: 40151
       unit: 3
       value: [0x0000, 0x0803]

For this I want to create more switches to be able to adjust the value in address 40755 as needed.
But you have to write always 3 registers with pause, 40151 → HEX802 / 40755 → HEX Value / 40151 → HEX 803
These are 32Bit registers, where the first register is filled with 0000.
With a modbus client in Windows it works very well, but unfortunately not in Home Assistant yet.
SI_Register

Can you help me to understand the syntax?
Thanks you all :wink: