Pulse counter - Non-Invasive Power Meter - Incorrect pulse count

I have a few questions around the pulse counter and power meter https://esphome.io/cookbook/power_meter.html

I have looked at the pulses on my oscilloscope, I decided to run the LDR through an opamp so I could get a cleaner pulse as can be seen the frequency of the pulse is <1Hz (<1 per second) yet I seem to get a pulse count of far greater than 60per/min around 120-300per/min is common.

An ideas?

  - platform: pulse_counter
    pin: D5
    id: power_meter
    name: 'Power Meter Energy'
    unit_of_measurement: 'kW'
    # count_mode: 
    internal_filter: 1ms
    update_interval: 10s
    filters:
      - multiply: 0.006 # 0.00277778  # (60s/10,000 pulses per kWh)    
    total:
        unit_of_measurement: 'kWh'
        name: 'Power Meter Total Energy'
        filters:
          - multiply: 0.0001  # (1/10,000 pulses per kWh)
        
  - platform: total_daily_energy
    name: "Power Meter Total Daily Energy"
    power_id: power_meter
    
time:
  - platform: homeassistant
    id: homeassistant_time    

I have just switched to a ESP32 from a Wemos ESP8266 D1 mini, and now its working correctly.