I’ve been tracking water data for some time, and had an existing sensor with gallons as my unit. When switching to this energy dashboard method, I changed the units to gal, and set the appropriate device_class and state_class, but the sensor still wasn’t showing in the dropdown.
It looks like I also had to update the units for previously stored datapoints. In Developer → Statistics I performed the following, and was able to select my sensor:
Hi everybody,
same problem, no water consumption showing in energy panel.
6 times checked configuration.yaml. Finally, I check the stats in the developer tools. There was some problem with my water entity and I fixed it.
Since then, my water and energy consumption have appeared immediately.
He He Erik-Jan, how are things?
I have used @PatBat it’s proposal, the 5th in this thread.
Added into the configuration yaml file. The water meter came up.
The issue with the m³ instead of L is not solved yet.
I do agree with others, why is it so hard to add this energy sensor. All the others came up, no issue!
I also want to know about @Duky his solutions and more guideline to understand what needs to be fixed?!
I tried several suggestions in this thread, only @PatBat solution with the template sensor seems to work. I have an MQTT sensor having the water usage data:
- name: Water Total
state_topic: iobroker/gruenbeck/0/calculated/Wasserzaehler
unique_id: "gruenbeck-wasserverbrauch"
icon: "mdi:water-pump"
unit_of_measurement: m³
device_class: volume
state_class: total_increasing
for which I need to create the same template sensor to have the entity in the energy dashboard shown up:
This does not seem right, I probably miss here something obvious. My MQTT sensor shows up properly in the Developer Tools/Statistics tab without any problems to be fixed. I also tried different device_class values.
Can someone point me to the source code which suppose to handle this case?
Edit: funnily it now shows up after I changed it to water. I had water there initially without success and after that I tried different device_class values. Whatever, it seems to work now, black magic
Edit2: I have removed the Template sensor rebooted and now the MQTT is gone again. This really drives me crazy.
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).