Repository navigation
v1.3.5 - Suggest the conversion between different units
Improvement
A suggested conversion when the two sensors store different units
When the source and the destination store their statistics in different units, the import result already warned you and imported the values exactly as stored. It now also shows the usual conversion between the two units, with a button that fills it in under Adjust imported values:
kWhtoWh: ×1000WtokW: ×0.001°Cto°F: f(v) = v * 1.8 + 32, since temperature needs an offset as well as a factor
It is only a suggestion. Nothing is applied until you run the import with it, and you can change it first if your sensors need something else. After clicking, run Preview again to check the result before importing.
When no suggestion is offered
- The two units measure different things, or Home Assistant has no conversion between them.
- Either sensor's statistics are recorded as a different kind of quantity. Temperature and temperature difference share the same units but convert differently, so a wrong
+ 32is never suggested. - Several pairs are imported in one run. Adjust imported values applies to every pair, so the button is left out and the result tells you to import that pair on its own.
Notes
- Nothing changes about what is written to your database unless you use the suggestion.
- The suggestion converts between the units your statistics are stored in. If you changed the source sensor's display unit in its entity settings, its History states are recorded in that display unit instead, and the suggested conversion may not suit them. The Energy dashboard uses the statistics, which the suggestion does suit.
- Back up your database before importing, as always.