Creating custom_component for switch with initial value

I created a custom_component for my water heater, as for now it only has On/Off control.
My water heater device accepts a ‘time’ argument.
Is there any way to create a switch which can have an argument? (by input_slider maybe)?
I looked for similar things but didn’t find anything similar.
Thanks !