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

Inconsistent Graph Units #5362

Closed
3 tasks done
DaAwesomeP opened this issue Mar 29, 2020 · 1 comment
Closed
3 tasks done

Inconsistent Graph Units #5362

DaAwesomeP opened this issue Mar 29, 2020 · 1 comment
Labels
Bug Current Bug in UI - Extra Attention stale

Comments

@DaAwesomeP
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.

The problem

Graphs do not always show the correct units. This seems to be caused when the units are overridden in some way. In the first screenshot below, on the left you can see the units selected by the graph and on the right you can see the final units in Home Assistant. My temperature sensors come into HA as Celsius, and then my locale settings convert them to Fahrenheit. For the pressure sensor, I have set a customization to change it from hPa to mbar, which the graph also ignores.

Cards

This issue appears to apply to the unit shown in the top left of the graph and the logic to combine/split graphs but not the actual value of the data/unit ticks shown. The entities card has no issue with selecting the correct units.
units issue

History pane

It looks like the locale issue and manual customization issue takes place in a different part in the code. The locales are taken into account in the main History pane but the customizations are not.
history units issue

Expected behavior

Graphs should show the configured, expected units.

Steps to reproduce

  1. Add your devices/sensors to Home Assistant
  2. Override the units

Environment

  • Home Assistant release with the issue: 0.107.7
  • Last working Home Assistant release (if known): Unknown
  • Browser and browser version: Firefox Nightly 76.0a1(2020-03-25) (64-bit)
  • Operating system: Windows 10 Pro 64-bit

Problem-relevant configuration

customize.yaml

sensor.bedroom_bme280_pressure:
  unit_of_measurement: mbar
sensor.basement_bme280_pressure:
  unit_of_measurement: mbar
sensor.living_room_bme280_pressure:
  unit_of_measurement: mbar

Additionally, setting preferred units in Home Assistant that do not match the incoming sensor units.

Javascript errors shown in your browser console/inspector

None

Additional information

Previous stale issue: #2394

On further testing, it appears that wiping the Home Assistant database fixes the issue. So, is it possible that the graphs are receiving the units from the database (which may have old, incorrect units are simply the incoming units) instead of the sensor itself?

@DaAwesomeP DaAwesomeP added the Bug Current Bug in UI - Extra Attention label Mar 29, 2020
@stale
Copy link

stale bot commented Jun 28, 2020

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 28, 2020
@stale stale bot closed this as completed Jul 5, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Current Bug in UI - Extra Attention stale
Projects
None yet
Development

No branches or pull requests

1 participant