Home Assistant water usage sensor ESPHome

Hi,

I’m experiencing a particular problem with my Home Assistant Energy Dashboard.
I integrated through ESPHome a proximity sensor using a NodeMCU board following this guide:
[Build a cheap water usage sensor using ESPhome and a proximity sensor - PieterBrinkman.com]

Everything seams work fine, data are updated every 6s but the measure is totally out of scale as you can see in photos. More than 1M liters a day are too many for my house :slight_smile:

Can you help me figuring out where is the problem?

Here’s my ESPhome yaml:

esphome:
  name: "nodemcu-consumo-acqua"

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

wifi:
  networks:
  - ssid: !secret wifi_ssid
    password: !secret wifi_password
  power_save_mode: none
  manual_ip:
    static_ip: x.x.x.x
    gateway: x.x.x.x
    subnet: x.x.x.x

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphome-Web-F9Ce75"
    password: "DvCxbDKsr5Iw"

captive_portal:

#SENSORE SU PIN 6 -> GPIO12

sensor:
  - platform: pulse_counter
    pin:
      number: GPIO12
      allow_other_uses: true
    update_interval : 6s
    name: "water pulse"
    id: water_pulse

  - platform: pulse_meter
    pin:
      number: GPIO12
      allow_other_uses: true
    name: "Water Pulse Meter"
    unit_of_measurement: "liter/min"
    icon: "mdi:water"
    total:
      name: "Water Total"
      unit_of_measurement: "liter"

  - platform: pulse_meter
    pin:
      number: GPIO12
      allow_other_uses: true
    name: "Water Pulse Meter"
    unit_of_measurement: "liter/min"
    icon: "mdi:water"
    total:
      name: "Water Meter Total"
      unit_of_measurement: "m³"
      id: water_meter_total
      accuracy_decimals: 3
      device_class: water
      state_class: total_increasing
      filters:
        - multiply: 0.001

  - platform: template
    name: "Water Usage Liter"
    id: water_flow_rate
    accuracy_decimals: 1
    unit_of_measurement: "l/min"
    icon: "mdi:water"
    lambda: return (id(water_pulse).state * 10);
    update_interval: 6s