I have an ESP32 currently monitoring my Electricity Meters (via pulse) x 4, water meter x 1 and various weather sensors. My Electricity data (for 2 meters) is currently uploaded to PVOutput for remote monitoring and the other data to Thingspeak (access via widget on phone). All my data is stored to a SQL database in 5 minute intervals also for periodical analysis.
I would like to add in my Electricity data to the built in Energy feature of HA however I have two queries
1. Can I add in ESPHome functionality into an ESP32 with unique custom code that is doing lots of other things (which I don’t want stored solely in HA). If so any pointers where I can find similar examples (doesn’t need to be energy obviously).
2. Can I expose data on the ESP32 another way which would make those values appear as sensors which HomeAssistant can access and therefore could complete the energy monitoring in HA as well.
Any pointers would be appreciated. Everything I have searched seems to just direct to ESPHome which if I can’t incorporate that into the existing code I have isn’t really a option and also don’t want to have to splice sensor wiring and run a extra ESP just for this functionality). Thanks.