Expecting control of type x but got y

Hello i am having issues with setting values for inputDevice.
WriteValueIntoEvent();

I set the type Button but i don’t know which value should i pass. (Float,Int,Bool or etc)

Is there a way of getting the type of value it requires so i will be able to pass the value i want?

Ex: if the value is type bool i will pass true or false, if it’s int i will pass 0 to 1.

                using (StateEvent.From(grip, out eventPtr))
                {
                    grip.WriteValueIntoEvent<int>(1, eventPtr);
                    InputSystem.QueueEvent(eventPtr);
                }

Edit: i did debuging
grip.GetType().FullName returns axisControl so i tried to pass
grip.WriteValueIntoEvent(axisControl.clamp.none, eventPtr);

Nevermind my bad. i got it resolved i passed the wrong input action