My Rapsberry is installed in my Electrical Cabinet. I also managed to read pulses from my Eltako DSZ15D Power Meter from S0 bus via Python Script directly connected to GPIO24. /100 Pulses per kWh
There is no need to use a ESP device and I like to have it integrated into my HASS installation.
I found a couple of tutorials including information overflow, but none of them are a solution for me.
Does someone have already a finished code working - or how to start ?
If I understood correctly you have the data necessary already within a python script and would like to push it into Home Assistant?
Have a look into the REST API (REST API | Home Assistant Developer Docs):
There is an example how to do a python GET request on that page via requests libaray (a POST example is here: Quickstart — Requests 2.26.0 documentation)
and and example how you can create a sensor via POST action on the REST API “/api/states/<entity_id>”