Homeassistant & Influxdb: Data discrepancy (Power sensor)

So i have been using HomeAssistant for a while now, and lately decided to export the data of many of the sensors also to InfluxDB for long term (>2 weeks) storage.
However today when i was doing a query to discover how much power my server uses i discovered something very troubling I cannot explain.

I ran a query to get the ‘mean’ power usage of my server:


Top image = homeassistant statistics,
bottom = influxdb dashboard

As you can see the ‘max’ part of the graph matches almost exactly (except the different smoothing) however the ‘mean’ is a good 10w (on average) off.

I did two more compares with different ranges with the next result:



Both are for the past 3 days & mean per hour, but again, influxDB is a good 10w (±20%!!) off.

I don’t have the same problem with a temperature sensor, which matches almost perfect.
image

Does anyone know what is causing this huge data discrepancy?
And could it have to do with the high update frequency of the sensor? If thats the case, shouldn’t the data ‘send’ to InfluxDB be averaged over that period?

Edit:
InfluxDB config incase it might be interesting:

influxdb:
  api_version: 2
  ssl: false
  host: <ip>
  port: 8086
  max_retries: 3
  token: !secret influxdb
  organization: homeassistant
  bucket: homeassistant
  default_measurement: units
  tags:
    source: HA
  tags_attributes:
    - friendly_name
  include:
    domains:
      - sensor
      - binary_sensor
      - switch
      - automation
      - button
      - device_tracker
      - group
      - light
      - person
      - vacuum
      - zone

Sensor: