Connect device directly on raspberry PI hassio

Just a single question : Is it possible to connect a device ( push button) directly on the raspberry pi hassio.
Is there a plugin for that ?
I have 2 esp8266 just in side of the raspberry which works with EspHome and i would like to connect the push button to the raspberry instead of use 2 esp8266