Understandably, if two statistics having the same base unit_of_measurement are selected on the same history dashboard, then they are displayed in the same graph (e.g., two pressure statistics with "unit_of_measurement":"inHg")
However, if they have different unit_of_measurement (e.g., inHg vs. hPa) but the same display unit (e.g., both inHg), then I get two different graphs with y-axis labeled inHg.
Shouldn’t the dashboard display be smart enough to know that the displayed units are plainly the same and therefore should be combined on one graph?
Said another the fact that the underlying unit_of_measurement is different shouldn’t matter so long as the display unit is the same.
There’s only one Y-axis. So only one unit per graph.
Also even with the same unit if the sensors have different device classes they don’t display on the same graph. Otherwise you end up with battery % on the same graph as relative humidity. Which would be kind of silly. The history panel did work this way in the “bad old days”.
Ahhh yes I can see that for "unit_of_measurement":"%" with different device classes.
But in my example,
All 3 sensors have "device_class":"pressure"
2 have "unit_of_measurement":"innHg"
1 has "unit_of_measurement":"hPa"
And the UI itself knows they represent the same underlying quantity as it gives me a choice to convert between “inHg”, “hPa” and several other equivalents…
So shouldn’t there be a middle ground between the “bad old days” and “today” whereby the same graph would be used if: Same “device_class” and same display unit?
Ahhh my bad…
I looked more closely at the core.entity_registry file.
For the same bme_680 sensor, my home-brew MQTT esp32 device (appropriately) set the device_class to atmospheric_pressure while ESPHome less accurately sets it to pressure which for example would be the same as a blood pressure device.
When I forced ESPHome to use the correct atmospheric_pressure class, then all the traces displayed on the same graph.
In my haste, I just grepped for ‘pressure’ and didn’t notice the atmospheric part