MQTT Garage Door but with no state from MQTT

Hi, Im using AMPIO Smart Home for hardware Home Automation, but Im using Home Assistent to integrate it with all the rest. Garage door gest only 1 and 0 to move garage gate. 0 - do nothing, 1 - change state or stop closing/opening. So when I press the button and its cloded, i will start to open, when I press it again during that time, the gate stops, when I press it again, its start to close again. But I added binery_sensor to check if gate is open or closed by using ESPHome. How can I integrate is to make one full garage door entity?
MQTT topic for gate is : ampio/from/14E03/state/o/9
binery_sensor: binary_sensor.garaz_brama_1
Thanks for any help