I’ve worked out a way open or close my garage door using a Raspberry Pi, a Tiva Launchpad (very much like an arduino), and a sun-visor garage door remote. The Launchpad is wired to the remote with constant 3.3v to the positive battery terminal, ground to the negative battery terminal. This powers the remote so no battery is necessary. A 3.3v digital out pin is connected to one side of the tact switch one would normally press to open or close the garage door. The RPi and Launchpad communicate using i2c. If the RPi sends an arbitrary byte, the Launchpad lights an onboard LED and sends 3.3v out to the tact switch, causing the remote to activate and the garage door opener to operate. This allows me to avoid running wires and installing relays as I have seen others do.
Is there an existing way for Home Assistant running on a Raspberry Pi to send i2c data?