#Make the energy cards unit dynamic?
1 messages · Page 1 of 1 (latest)
the energy dashboard is intended to gain insight into the household level of energy consumption, which is always in kWh. 120Wh solar is not a meaningful amount at the household level
Thanks. I monitor solar/ battery energy in my camper, which in fact doesn't produce household level. Is this too much of an edge case?
I understand that energy prices are per kWh, but at such low amounts that isn't the concern I think. I'd rather have displayed 23.4 Wh instead of 0.02 kWh and make that conversion myself when needed. Although with displaying 2.34 MWh vs. 2,345.65 kWh, so upward unit conversion, I'm not so certain.
I do know features have been added before targetted at van/campers, so perhaps it's not that much of an edge case.
I think an issue that comes to mind is that when we pull the data from statistics, we include the unit upfront we want from backend when we request the data (which was just hardcoded as "kWh" as the most obvious choice), so it's a bit weird that I guess in your case we would request all the data in kWh, and then after that comes back, we would have to convert all that data to a different unit based on the data itself, seems a bit hacky.
I once had a thought that if all the entities in a certain graph were the same unit, we could request and use that unit instead instead of the default one. But I never tried to implement it.
Was mostly thinking in the context of water or gas as I know sometimes people complain about the default unit for that, and they usually only have like one or two entity. But could apply to energy as well.
That indeed sounds less sketchy. I'll have a look in that direction, thanks!
Yeah I saw those while looking for similar Issues, I'll have them in mind. #24991 (Energy dashboard rounds values leading to inconsistent graphs) would also be covered by your idea.
One thing that hesitates me a bit is that there are multiple places where kWh are hard coded. For example in the translations, so those would require a (small, removing "kWh") update to.
Yeah I haven't thought through every implication, nor do I have any idea if it would be approved or not. Just a half-formed idea 😅