Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Energy Dashboard: water consumption is always shown in Liters (L) even when sensor uses m³ #23318

Open
4 tasks done
KC-inDomus opened this issue Dec 17, 2024 · 2 comments
Open
4 tasks done

Comments

@KC-inDomus
Copy link

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

Having a sensor.home_water entity collecting an increasing float value of water consumption, customized as follow:

sensor.home_water:
  friendly_name: Casa - ACQUA
  last_reset: '1970-01-01T00:00:00+00:00'
  device_class: water
  state_class: total_increasing
  unit_of_measurement: m³
  icon: mdi:water

seems impossibile to let Enery Dashboard show the correct unit of measurement (m³): the graph always express values in Liters (L) x1000 (if you got 3m³, graph shows 3.000 L).

Describe the behavior you expected

Graph must show m³ values.

Steps to reproduce the issue

  1. create a sensor
  2. customize it
  3. populate with a correct value

What version of Home Assistant Core has the issue?

2024.12.3

What was the last working version of Home Assistant Core?

n.a.

In which browser are you experiencing the issue with?

No response

Which operating system are you using to run this browser?

No response

State of relevant entities

-

Problem-relevant frontend configuration

-

Javascript errors shown in your browser console/inspector

-

Additional information

No response

@karwosts
Copy link
Contributor

Even if it's not ideal this was the intended behavior, all energy statistics are always normalized to a known unit before display, based on your English/Metric setting, this allows for showing multiple sensors with different units in the same chart.

Perhaps if only having one unit it could have kept that one for display, but that's not how it was coded.

@KC-inDomus
Copy link
Author

KC-inDomus commented Dec 18, 2024

Even if it's not ideal this was the intended behavior, all energy statistics are always normalized to a known unit before display, based on your English/Metric setting, this allows for showing multiple sensors with different units in the same chart.

Perhaps if only having one unit it could have kept that one for display, but that's not how it was coded.

To be honest, it’s total nonsense to me. If I have a sensor expressed in m³, I expect to see it expressed in m³, not in liters (among other things: why multiplied by a thousand?).
Look what happened with gas: if you have a sensor expressed in m³, you show all the graph data in m³. I can’t understand why this was the intended behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants