Communication between home assistant and Pic18F45k22

Hello everyone, actually i’m working on a project smart home i’m using home assistant on raspberrypi 3 and Pic18F45k22 i want to keep a communication between this two system , what do you suggest to me , using esp32 or i2c protocol ? Thank you

Pic18F45k22 is a micro-controller, right?
So those options do not make sense (to me).

Why Pic18F45k22 rather than ESP32, for which ESPHome and HA integration laready exist?