Energy meter stopped working

Got my energy meter integrated with a rest API. This does still work, but the conversion to a sensor for the energy tab stopped working with the last update. Does anybody work what the issue is?

Here the config for the sensors. The sensor that they refer to still work.

  - sensor: 
    - name: "Electricity Import  All" #the one that i use on the energy tab
      unit_of_measurement: kWh
      state: "{{ states('sensor.Electricity_import') }}"
      attributes: 
        device_class: energy
        state_class: total_increasing 
        

  - sensor: 
    - name: "Electricity Export  All" #the one that i use on the energy tab
      unit_of_measurement: kWh
      state: "{{ states('sensor.Electricity_export') }}"
      attributes: 
        device_class: energy
        state_class: total_increasing

Seems that after a second restart the sensors started working again. all fine.