Astro MoonDistance in Miles?

I’m trying to determine what is the “right” way to show the Moon’s distance in miles. The binding instructions show:
Number:Length MoonDistance "MoonDistance [%.1f %unit%]"
but that give me inches which is not very valuable. What I want is miles. I can force miles by changing the item definition to be:
Number:Length MoonDistance "MoonDistance [%.1f mi]"
What is the “right” way?

If all you want to do is show it in miles, you’re “forcing” is the right way. The point of units of measurement is that it doesn’t matter how the value is stored, you can convert it to some other compatible unit by telling it what units you actually want.

Thus, the Item may store °C but you can convert it to °F just but telling it you want it as °F.

1 Like

I appreciate the response. I’ve been using openHAB for five years and each time I do a fresh install, I learn a little bit more.