Switch command return RefreshType

Hi, I’m on Windows and I’m trying to develope my own Binding.

I have created a binding skeleton with the file /git/openhab2-addons/addons/binding/create_openhab_binding_skeleton.sh and I changed the item-type to Switch. I have put a break point on the handleCommand method of the Handler class and run on debug.

My issue is that my command is a RefreshType and not a OnOffType . Does anybody knows why ?

Here is my thing-types.xml file

	<!-- Sample Thing Type -->
	<thing-type id="sample">
		<label>ObjectRest Binding Thing</label>
		<description>Sample thing for ObjectRest Binding</description>

			<channel id="channel1" typeId="sample-channel" />


	<!-- Sample Channel Type -->
	<channel-type id="sample-channel">
		<label>ObjectRest Binding Channel</label>
		<description>Sample channel for ObjectRest Binding</description>


and here is my Handler class

public class ObjectRestHandler extends BaseThingHandler {

    private final Logger logger = LoggerFactory.getLogger(ObjectRestHandler.class);

    private ObjectRestConfiguration config;

    public ObjectRestHandler(Thing thing) {

    public void handleCommand(ChannelUID channelUID, Command command) {
        if (channelUID.getId().equals(CHANNEL_1)) {  //with a breakpoint here

    public void initialize() {
        config = getConfigAs(ObjectRestConfiguration.class);

Thank you for helping me.