False pulses using water meter and ESP8266

Hello. I was hoping to get some advice, have been reading about registering false pulses, but did not really come to any solution yet.
I have a water meter with built in pulse generator (1 pulse per 1 liter). Something like this here:
image

It is just 2 wires, which I hooked between GND and GPIO12 pins on ESP32. It is counting pulses, but it is also registering false pulses, such as during night when there is no water consumption at all.
I confirmed by checking last night and this morning. While I used only 53 liters of water, ESP counted 86 pulses (==86 liters).
I am using only cable supplied with water meter (~80cm long), not extending it. ESP is in the plastic box tied to one of heating pipes.
I tried playing with internal filter, but that did not bring any results. Below is my code. Can anyone advise?

sensor:
  - platform: pulse_counter
    pin:
      number: GPIO12
      inverted: true
      mode:
        input: true
        pullup: true
    name: "Water Flow"
    unit_of_measurement: "l/min"
    icon: "mdi:water"
    update_interval: 15s
    accuracy_decimals: 3
    internal_filter: 400ms
    count_mode:
      rising_edge: DISABLE
      falling_edge: INCREMENT
    filters:
      - lambda: return (x);
    total:
      name: "Total Water Consumption"
      unit_of_measurement: "m³"
      device_class: water
      state_class: total_increasing
      accuracy_decimals: 3
      icon: "mdi:faucet"
      filters:
        - lambda: return (x / 1000.0);

I believe the largest value you can use for internal_filter is 13us, unless you disable the internal pulse counter. Try adding use_pcnt: false to allow your 400ms value to take effect.

I was using wemos d1 mini (esp8266) that does not support use_pcnt, that is supported only on esp32. So I switched last night to esp32, used use_pcnt and removed completely internal filter (largest possible value is 13us).
I compared last night and this morning, values seemed to match. I will give it a day or two to confirm.

Seems like that resolved it. Counter is almost precise now.