I built a water meter sensor based on ESPhome, an ESP32 and the LJ18A3-8Z/BX sensor. The device works flawlessly, and it reports the total water usage in m^3 as expected. Now, I’m trying to add that sensor to the Energy Dashboard.
I expected it to show me the “sensor.water_consumption_total” sensor as it reports in m^3, for example “848,862 m³”, but the water sensor does not show up in the Energy Dashboard dropdown list.
I’m not sure how to debug this any further. The documentation did not point me in the right direction - perhaps someone more experienced can? Here is the ESPhome config I use:
sensor:
# Uptime in seconds
- platform: uptime
name: Uptime since boot
id: uptime_seconds
update_interval: 10s
# Pulse COUNTER reports water usage in absolute liters
- platform: pulse_counter
pin:
number: GPIO34
inverted: true # Active LOW input, does not really matter since we're counting pulses
mode:
input: true
# pullup: true # GPIO 34/35/36/39 are input only, no internal pull-up - use external resistor
#
id: water_consumption
name: "Water consumption"
unit_of_measurement: 'liter'
device_class: water
state_class: total_increasing
#
icon: "mdi:water"
update_interval: 6s
#
total:
id: water_consumption_total
name: "Water consumption total"
unit_of_measurement: "m³"
icon: "mdi:water"
#
accuracy_decimals: 3
device_class: water
state_class: total_increasing
filters:
- multiply: 0.001