Rf gate uses one command to open or close how to configure

Hi All,

I have a fence with a remote based on rf443mhz. I have bought a RFLink Gateway so I can capture the signal to control the fence via Home Assistant. When opening the fence I see a new entity inside HA which is recognized as an on/of switch. When I switch this switch to on and off my fence is going open and when switch on and off again it’s closing. The way it’s working is not optimal and I want to change it to an open button and an off button. What is the best way to configure?

UPDATE

I have captured the signal, command and id, see below:
2024-08-22 22:49:52.043 DEBUG (MainThread) [rflink.protocol] received data: 20;02;Aster;
2024-08-22 22:49:52.047 DEBUG (MainThread) [rflink.protocol] received data: ID=02b8;SWITCH=02;CMD=OFF
2024-08-22 22:49:52.051 DEBUG (MainThread) [rflink.protocol] received data: ;
2024-08-22 22:49:52.052 DEBUG (MainThread) [rflink.protocol] got packet: 20;02;Aster;ID=05g3;SWITCH=02;CMD=OFF;
2024-08-22 22:49:52.052 DEBUG (MainThread) [rflink.protocol] decoded packet: {‘node’: ‘gateway’, ‘protocol’: ‘aster’, ‘id’: ‘05g3’, ‘switch’: ‘02’, ‘command’: ‘off’}
2024-08-22 22:49:52.053 DEBUG (MainThread) [rflink.protocol] got event: {‘id’: ‘aster_05g3_02’, ‘command’: ‘off’}
2024-08-22 22:49:52.053 DEBUG (MainThread) [homeassistant.components.rflink] event of type command: {‘id’: ‘aster_05g3_02’, ‘command’: ‘off’}
2024-08-22 22:49:52.053 DEBUG (MainThread) [homeassistant.components.rflink] entity_ids:
2024-08-22 22:49:52.053 DEBUG (MainThread) [homeassistant.components.rflink] device_id not known and automatic add disabled

It looks like the remote only send one signal “command off”. In my theory I need to define a single button and relate the same command to it but I tried but doesn`t succeed yet. Can anyone help?