I found a solution in Home Assistant - Utility meter. HA has possibility of creating periodic statistics from quarter of an hour, hour, daily, weekly etc. For my use, it takes the kWh feed as input using the emoncms API-key.