esphome:
name: water-meter
friendly_name: Water Meter
esp32:
board: esp32dev
framework:
type: esp-idf
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "FtTq4yEtNt10mevs1bTtnGwcV39csn6Ik45uwn9h67Q="
ota:
- platform: esphome
password: "0f20a023b300da75b46326778635e586"
preferences:
flash_write_interval: 1min
sensor:
- platform: pulse_meter
pin:
number: GPIO18
mode:
input: true
pullup: true
inverted: true
name: "Water Flow Rate"
unit_of_measurement: "gal/min"
accuracy_decimals: 2
device_class: water
state_class: measurement
internal_filter: 100ms
timeout: 5min
total:
name: "Water Usage Total"
unit_of_measurement: "gal"
accuracy_decimals: 0
device_class: water
state_class: total_increasing
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Water-Meter Fallback Hotspot"
password: "BUUGbMS5G45a"
captive_portal: