Energy dashboard, water consumption

Hi,

I’m a HA user from France and have a working installation using zigbee sensors, cams and a “Legrand ecocompteur 412000” energy management module.

image

From the IP connected module, I can connect the grid consumption meter “Linky”, various pulse-based meters (e.g. tap water counter) and tore signal to read power info from up to 5 power lines.

Linky

Water meter

This said, I can read and display the information from the energy module:

in /config/sensors.yaml

  - platform: command_line
    name: EcoCompteur Consommation
    command: curl -s 'http://192.168.1.175/data.json' | jq '.conso_base | floor/1000'
    scan_interval: 10
    unit_of_measurement: kWh

  - platform: command_line
    name: EcoCompteur Eau froide
    command: curl -s 'http://192.168.1.175/inst.json' | jq '.data6'
    scan_interval: 2
    unit_of_measurement: m³
    state_class: total_increasing
    device_class: water

The first sensor is for grid consumption: I created a utility meter for this and got it displayed in the dashboard

The second is for water, and whatever configuration I try, I can’t get it to display in the energy dashboard. I have spent hours trying to make it work without success :frowning: I read tens of articles/post etc and I really can’t see anyone displaing water consumption!

I created an utility meter the same way as for the kWh:

and I always get the same message, whether I create the utility meter through the UI or manually:

I also tried to edit the utility meter manually:
image

Tryed to wait from 5 minutes… to…hours, nada. Statistics exist, played around with state_device, device_class, unit in m3 or m³? rien du tout, nichts, nada

Is there anyone who has ever displayed water consumption in energy dashboard?

Thanks for your assistance

François

Hi there,

got a solution and questions :slight_smile:

To get the water consumption displayed in energy dashboard, it seems that there is a need for state_class and device_class parameters while it’s not necessary for kWh ! don’t know why !

With command_line platform, state_class and device_class don’t report any setting fault but are not supported in documentation.

So I use the rest platform (I didn’t find it by myself !) :slight_smile:

/config/configuration.yaml
rest: !include config_rest.yaml

/config/config_rest.yaml
#######################################################
  # LEGRAND EcoCompteur - m3
  #######################################################
  - resource: http://192.168.1.175/inst.json
    scan_interval: 5
    sensor:
      - name: EcoCompteur Eau froide
        unique_id: ecocompteur_eau_froide
        value_template: '{{ value_json.data6 }}'
        device_class: water
        unit_of_measurement: m³
        state_class: total_increasing

then it appears in the dashboard: yessssssssss! well it’s not perfect as it shows in L instead of m3 as expected. The calculation is correct (cost and volume).

I guess there are some limitations here and there, some improvements to the source code to be made, but as long as there is a workaround to reach the goal, it will remain as it is.

There is maybe another way to get the correct volume unit but to me it’s good enough for the moment.

PEF