Modbus write register issue

Hi,
i have configured a switch “SET TEMP” to write a temperature value using MODBUS and it’s works well,

switches:
      - name: "SET TEMP"
        slave: 1
        address: 3
        write_type: holdings
        command_on: 210
        command_off: 300

now I would like to use the modbus.write_register action to write the same temperatire value to the specified register but it doesn’t work.

data:
  hub: modbus_hub
  unit: 1
  address: 3
  value: 210
action: modbus.write_register

Can help me please?
Thanks
Franco