Pulse counter YAML

Hi, I have created a pulse counter to indicate my power useage of an appliance. The counter works but it does not increment the pulses in a total count. Only counts on the first pulse. It does not accumulate the total: eg 0+1=1:1+1=2, etc. How can this be corrected? I need to get a total count over a period of say 24 hours.

This is my YAML file.

esphome:
name: pulsteller
friendly_name: pulsteller

esp32:
board: esp32dev
framework:
type: arduino

sensor:

  • platform: pulse_counter
    pin: GPIO34
    unit_of_measurement: ‘kW’
    name: ‘Pulsteller1’
    filters:
    • multiply: 0.001 #(60s/1000 pulses per kWh)

Enable logging

logger:

Enable Home Assistant API

api:
encryption:
key: “key”

ota:

  • platform: esphome
    password: “key”

wifi:
ssid: “ssid”
password: “pw”
manual_ip:
static_ip: 192.168.2.xx
gateway: 192.168.2.254
subnet: 255.255.255.0

Enable fallback hotspot (captive portal) in case wifi connection fails

ap:
ssid: “Pulsteller Fallback Hotspot”
password: “pw”

captive_portal:

Please format your code so it can easily be read.

Koying Chris B

Thanks for the reply. You suggestions hit the mark. Working fine now.