Your gas consumption sensor seems to have regular periods where it is unavailable. Perhaps this is messing with the utility meter. Fix that first and see what happens.
You referring to the points where its missing line in the graph part , right?
Not much I can do about I think. Getting the data from a P1 DSMR wifi gateway. Which apparently gives me a proper line of data of kWh. But sometime is a bit dodgy on the usage.
Although I doubt if it really is unavailable , looking those points up in graph still gives me values.
I mean the discontinuities in the gas consumption graph. You need to fix that. If you can’t fix the sensor the a workaround would be a template sensor that remembers the last value when the consumption sensor is unavailable. Then feed that to the utility meter.