I purchased a MimoLite ZWave relay (https://www.amazon.com/Wireless-Z-Wave-Multi-Input-Output-Contact/dp/B00B6RZ7MM) that I have connected to my HA for just this. Allows both sensing if open / closed, as well as trigger the opening / closing mechanism.
Here’s a video (I haven’t watched it, but I’m sure it’s similar) https://www.youtube.com/watch?v=RPnY2Khukco
I also purchased some cheap alarm magnet sensors that I wired into the Mimo for the open/close (my gate wouldn’t tell me, so I used the mimo / these) https://www.amazon.com/gp/product/B00LYCUSBY
I also created a custom switch that combines the cover and switch to open / close the gate.
- platform: template
switches:
front_drive_gate:
friendly_name: "Front Driveway Gate"
value_template: "{{ is_state('binary_sensor.front_gate_contact', 'on') }}"
turn_on:
service: switch.toggle
data:
entity_id: switch.front_gate
turn_off:
service: switch.toggle
data:
entity_id: switch.front_gate
Anyhow, hope it puts you on the right track.