I’m not sure that covers all the use cases and I fear getting into a situation where something is messed.
What’s the unit of the Item under these circumstances?
- no unit provided
- unit provided, same as system default
- unit provided, different from system default
Unit Provided | No SD | SD Same | SD Different |
---|---|---|---|
None | Default | NA | NA |
Provided | Default? with or without conversion? | Provided | SD? with or without conversion? |
It’s that bottom right cell that causes problems. When the units provided from the binding is different from the units in the State Description. In the past, it was completely wrong (IMO) and it would apply the SD units without conversion, so my 22 °C becomes 22 °F.
I think it’s clear that it should do the conversion to SD at some point, but where? Before assigning the state to the Item? At display time only?
And of course persistence is a wholly different kettle of fish but there’s already an issue open to address that so let’s ignore that for the moment.