How to configure REST sensor that allows to monitor grid consumption

I have added this REST sensor that logs my current consumption:

sensor:
  - platform: rest
    name: Grid consumption
    device_class: energy
    state_class: measurement
    resource: https://my_current_consumption
    value_template: "{{ value_json.value }}"
    unit_of_measurement: kWh

But it doesn’t show up when I wan’t to add grid consumption data:

image

My sensor seems to work correctly and data is there.

It seems that I can answer my own question.
It needs to be :


state_class: total_increasing

I’m having a similar issue
I’ve created several sensors (Elec, Gas, Solar #1 + Solar #2) that I believe meet all the requirements to show in the “Configuration / Energy” category

state_class: total_increasing
status: collecting
unit_of_measurement: kWh
device_class: energy

But 1 of my sensors is still not showing