Looks like water usage data is now showing up in my Energy Dashboard… Hopefully it sticks and will be accurate… I’ll update this message when not…
I started all over in ESPHome (ESP8266 Wemos D1 Mini with a simple NPN sensor) based on parts in this thread. I used all new names / IDs. I removed everything from configuration.yaml. The following is what I now have in ESPHome:
The Water Consumption ‘metric’ was immediately visible in the drop down list. No error messages appeared in the following hours. Data started to flow in in next hours.
to allow display of units as cubic meters m^3. this alone would still not show the sensor in the energy dashboard.
after doing some reading, it appears home assistant wants to see this as a DEVICE_CLASS_WATER. to make this change, I updated my customize.yaml file in the HA root directory with the following entry.
sensor.water_meter_12345678:
device_class: water
This allows the entity to be added to the energy dashboard. Not sure if the numbers are displayed correctly (due to me reading cubic meters, but, I do get a number that corresponds to what is actually on the eyeonwater.ca page.
I hope this helps going forward, and again, thanx for writing this integration!!!
the Energy Dashboard immidiately showed my usage for the whole history of more then a year, but without cost associated (which I added as fixed price).
Thanks for this, fixed my problem by comparing configs.
My ESP config was missing device_class and state_class.
I changed the measurement unit from M3 to m³ also, although I don’t think that was part of the problem.
After changing measurement unit, don’t forget to ‘Fix’ statistics too as described here above.
Dont understand how to set this up
i have a flow sensor which gives me the current flow rate, not accumlating usage.
do i need to put it through utility meter first to get it to count ? and then set it up for energy dashboard?
Hi,
if you only have a flow-rate you first must calculate the absolute value. If you have the flow every 5 minutes, you must add every 5 minutes your value to a counter. You need a always increasing value.
I also tried for hours to add the water consumption to the energy dashboard.
Ich habe an meinem Wasserzähler ein “KY-033 Linien Folger Line Tracking Sensor Modul TCRT5000”, das ich über den Analogport an einem ESP8266 angeschlossen ist, der in ESPHome eingebunden ist. Mit den Digitalen Ausgang habe ich an manchen Stellungen des Liter-Zeigers falsche Impulse bekommen, wenn der Zeiger an bestimmten Stellen stehenblieb.
Mit dem analogen Auslesen gibt es kein Problem mehr. Ich habe den A0 Port direkt mit dem Kollektor des IR-Transistors verbunden. Die Schwellwerte habe ich so gesetzt, dass genügend Hysterese zwischen ON und OFF ist.
Für das Energie-Dashboard habe ich einen Template-Sensor angelegt, dieser muss die Einheit m³ haben.
ESPHome:
#Helper that is Switched on and off by Analog Value
switch:
- platform: gpio
id: ipin
pin: 13
# Analogsensor connected to IR-Transistor
sensor:
- platform: adc
id: ntc_source
name: 'Water Meter Analog IN'
#internal: true
disabled_by_default: true
pin: A0
update_interval: 0.2s
filters:
- or:
- throttle: 10s
- delta: 0.01
on_value_range:
- below: 0.17
then:
- switch.turn_off: ipin
- above: 0.20
then:
- switch.turn_on: ipin
- platform: pulse_counter
pin: 15 #verbunden mit Pin 13
unit_of_measurement: 'l'
name: 'Water Meter House'
id: pulse_water_counter
update_interval: 60 s
internal_filter: 50ms
count_mode:
rising_edge: DISABLE
falling_edge: INCREMENT
total:
unit_of_measurement: 'm3'
name: 'Water Meter Total House'
state_class: total_increasing
id: m3_Total
filters:
- multiply: 0.001 # (1/1000 pulses per m3)
accuracy_decimals: 3
Recently I came across the same problem: all three config params are correct but no sensor in Energy dashboard settings. It appeared that another one precondition must have been met - the sensor’s data must be recorded to DB, and this is not quite obvious. I have custom settings for recorder, not to overload the DB with hundreds unneeded sensors, so after I manually added my water meters sensors to recorder config and restarted HASS - all works.