How to connect esp32 to HA without esphome?

As said in the title, I want to connect an esp32 to ha without installing esphome software. Reason for that is that I’m more used to arduino ide and i want to create more complicated projects including display etc, and i believe that will be pretty annoying to port to esphome. Some of the features I need are:

  • seamless lights (they could be controlled from both from the ha and the esp itself, onboard button for ex.)
  • push button that could be read by ha
    So my question is, if it is hard to do what i described above and still easier to do in esphome(the hard thing in the esphome will be probably configuring the oled display) or is there an example of arduino based communication between esp and ha?

porting might not be that difficult, I’ve never done it. but by default esphome uses the arduino framework.
also tasmota does if that is an option for you.
if none of this is, I would suggest MQTT
you could take a look here

or here

Just an fyi, any thing that you need to do on esphome outside the standard config, is coded in C++. I think most of the display coding is C++ right off the bat

Yes, what all by esphome based lights “are”

Obviously. Also rotary encoders and more

Yes, basically this is what esphome is build for. Allowing you maximum freedom with minimal effort.

Can’t be much easier. Example for a oled in action

You can downgrade a arduino to act as a port extender for a esp - in this case the communication is still handled by esphome (via native pi to ha)

Arduino Port Expander — ESPHome

On my ESP8266 furnace button clicker xd, I just made a REST(y) API:

On my HomeAssistant config, I’m using REST integration:

switch:
  - platform: rest
    resource: http://esp8266.local/api/furnace
    name: Furnace heating
    verify_ssl: false
    is_on_template: "{{ value }}"
    unique_id: furnace_heating_switch