I purchased a MimoLite ZWave relay (Amazon.com: Wireless Z-Wave Multi-Input/Output Dry Contact Bridge; Cert ID: ZC08-16040002) that I have connected to my HA for just this. Allows both sensing if open / closed, as well as trigger the opening / closing mechanism.
**UPDATE: Looks like the MimoLite is no longer widely available. While not tested, appears this item should work: Zooz Z-Wave Long Range MultiRelay ZEN16 800LR for Garage Doors, Sprinklers, Gas Fireplace; 3 Dry Contact Relays (15A, 15A, 20A); 12-24 V AC/DC or USB C Power; Signal Repeater; Hub Required: Amazon.com: Tools & Home Improvement
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) Amazon.com : 1 : Electronics
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.