Utility meter not giving accurate readings

I got solar installed last week and I’ve been trying to get my energy dashboard sorted. For the most part it’s working fine but as I’m on a split tariff I want to get the costs more accurate. As the plan is to not use the grid during the day.

I have a sensor from the solar which gives me the imported from grid value. I have put that as the sensor for the utility meter however the utility meter is only giving me around half of the total reading.

utility meter yaml:

utility_meter:
  daily_energy:
    source: sensor.grid_energy_in
    cycle: daily
    tariffs:
      - peak
      - offpeak
  current_daily_energy:
    source: sensor.grid_energy_in
    cycle: daily

Here’s my Tariff select sensor:

  - platform: template
    sensors:
      electicity_tariff:
        device_class: monetary
        friendly_name: Tariff
        unit_of_measurement: GBP/kWh
        value_template: >    
          {%- if is_state('select.daily_energy', 'offpeak') %}
            0.1396
          {%- elif is_state('select.daily_energy', 'peak') -%}
            0.43222
          {%- endif -%}

For example, today I have used 10kwh from the grid all of which was between midnight and 7am (charging batteries from the grid) this is the time that the offpeak utility meter should be running.

However, the offpeak utility meter is only showing 5kwh used. Peak is showing zero as it should.

Here is the history page showing the two readings. Am I wrong in expecting that these two should be identical until after 7am where it switches to peak power?

Peak power + offpeak power should = grid energy in