ESPHome Gas Meter Setup

Trying to set up my gas meter with ESPHome. Running on an ESP32s, my meter output is 1 pulse = 1ft3. It is simply 2 cables that make continuity every ‘pulse’.

When testing, I simply touch my two cables together from the ESP32 to simulate a ‘pulse’ and seem to get random readings, but never 1ft3. Assume i’m missing something obvious here, my esp YAML is:

# Gas Meter Pulse Sensor 1 pulse = 1 ft3

sensor:
  - platform: pulse_counter
    pin:
      number: 14
      mode:
        input: true
        pullup: true
    accuracy_decimals: 2
    update_interval: 20s
    unit_of_measurement: ft³
    name: "Gas Meter"
    device_class: gas
    id: gas_meter
    icon: mdi:fire

Maybe it’s due to what it says under Converting Units?

Maybe you need to add a total?

Yeah, I added in a total and the figure that comes from that is correct. I’m unsure what the other random figures are but they are irrelevant.

Also changed to pulse_meter.

I think they’re a “per minute” type values and if you were “pulsing randomly” during testing then they would have been all over the place.

They might be a little like “time between pulses”.

Seems a bit weird as default behaviour to me but sure it makes sense in some context…

try this: Gaszähler mit ESP8266 und Home Assistant auslesen - Smarthome Doku works for me.