Ok so I did some research and experiments.
The first problem is that I don’t have a quantum sensor, which is required to get accurate measurements.
Instead I have to make an assumption that my lux readings matches a pre calibrated light source.
So to convert my lux measurements to PPFD (Photosynthetic Photon Flux Density) as if it was sunlight I use this table: PPFD to Lux conversion
Next step is to calculate the integral of all measured values over a whole day.
For this I found a python library called scipy which has numerical integration functions, of which I used the integrate.trapz function. It takes two arrays (here PPFD values and timestamps from HA) as input and gives a single number as output.
Because the timestamp includes microseconds I divide by 1000000 which should give me the unit μmol/day-m^2 and then by 1000000 again to get mol/day-m^2 which is the unit for DLI.
I am not sure how accurate all of this is but here are the results for two of my plants.
Plant 1 which is standing outside near an east facing wall:
DLI = 27.17
Plant 2 which is standing a bit inside from an east facing window:
DLI = 2.36