Energy consumption entity not listed

I have a Neurio 3 phase power sensor connected into my apartment distribution box. It has RESTful output so if interrogated like this:
http://192.168.1.229/current-sample
it returns a string like this:

{“sensorId”:“0x0000C47F5101A36F”,“timestamp”:“2021-11-25T10:31:04Z”,“channels”:[{“type”:“PHASE_A_CONSUMPTION”,“ch”:1,“eImp_Ws”:55028399846,“eExp_Ws”:47559238,“p_W”:156,“q_VAR”:151,“v_V”:257.107},{“type”:“PHASE_B_CONSUMPTION”,“ch”:2,“eImp_Ws”:32016529737,“eExp_Ws”:26598309,“p_W”:73,“q_VAR”:-427,“v_V”:257.704},{“type”:“PHASE_C_CONSUMPTION”,“ch”:3,“eImp_Ws”:45259820021,“eExp_Ws”:9760,“p_W”:154,“q_VAR”:-226,“v_V”:258.574},{“type”:“CONSUMPTION”,“ch”:4,“eImp_Ws”:132244317864,“eExp_Ws”:14223627,“p_W”:383,“q_VAR”:-502,“v_V”:257.795}],“cts”:[{“ct”:1,“p_W”:156,“q_VAR”:151,“v_V”:257.107,“i_A”:0.869},{“ct”:2,“p_W”:73,“q_VAR”:-427,“v_V”:257.704,“i_A”:1.853},{“ct”:3,“p_W”:154,“q_VAR”:-226,“v_V”:258.574,“i_A”:1.210},{“ct”:4,“p_W”:0,“q_VAR”:0,“v_V”:257.124,“i_A”:0.000}]}

One of the outputs is total instantaneous power consumption of all 3 phases and I want to use that for the consumption part of the Energy page but I cannot get the sensor to appear in the entity list.

My REST sensor:
rest_sensor1

showing it working:

I have done integration to convert watts to kilowatt/hours. My integration sensor:
integration_sensor1

showing it working:

Entities working (also split out the individual phases):
output

So, I believe I have all the required inputs, but I can’t see what else I need to do to include on the Energy page. I have read the Sensor Entity | Home Assistant Developer Docs link and believe I have the state_class & device_class as required but still nothing.

Is anyone able to point out my mistake? Or can’t restful sensors be used for integration & applying into the energy page? I know the Neurio sensor is old & no longer supported by manufacturer but the actual device has been installed & working well for 6 years & still has local output even after the cloud support was taken down.

Your integral sensor seems to have the state_class total instead of the required total_increasing.

A unit of kWh and state_class: total_increasing are the requirements for the entity to be available in the energy dashboard.

2 Likes

If I add state_class to that sensor like this:
new_state_class

I get the following error when I Check Configuration:

Invalid config for [sensor.integration]: [state_class] is an invalid option for [sensor.integration]. Check: sensor.integration->state_class. (See ?, line ?).

1 Like

Thanks very much Tom - it is working now.
I have been using Home Assistant for many years but never used Customized Entities before.

For anyone else in the same predicament, these are the settings (that were changed from above) that work for me:
sensor_integration

I have the same Neurio system, and I was able to get it working by following this guide. However I found an error, for the rest sensor the device_class has to be power to use unit_of_measurement: W. I discovered this via the Developer Tools / Statistics page, which showed an error for total_consumption.

My rest configuration:

rest:
  - resource: http://10.10.10.6/current-sample
    scan_interval: 5
    sensor:
      - name: total_consumption
        value_template: "{{ value_json['channels'][1]['p_W'] }}"
        unit_of_measurement: W
        state_class: measurement
        device_class: power

NB I’m using a different channel to your setup, I only have a single phase and no generation.

My integration sensor:

- platform: integration
  source: sensor.total_consumption
  name: energy_used
  unit_prefix: k
  round: 2

The customisations (applied via the GUI):

sensor.energy_used:
  state_class: total_increasing
  unit_of_measurement: kWh
  device_class: energy

I finally have a working Energy panel and I’m waiting for data to become available.