-
-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default imperial unit for Length changed from inches to feet #3552
Comments
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/openhab-4-0-milestone-discussion/145133/175 |
It's raining here now.
|
It's debatable if the bug is in core or in the documentation. When the default units were added in #3143, it was suggested to use feet: #3143 (comment). |
It's definitely a regression from prior behavior (pre 4.0), especially when dealing with devices that report values in mm or less. For example the Netatmo rain gauge has an accuracy of 0.1 mm which is 0.000328084 ft. The common way to measure rain in the US is in inches, and now the log file contains 0.0833333 ft for an inch Prior to #3143, the value in the log file was 0.00393701 in for 0.1 mm. |
Thinking more about this, I can't think of any use cases that would prefer feet over inches for home automation. |
@J-N-K Please let's not do
which will currently default to
but instead make the user pick the normalization like this:
@robnielsen would have picked the correct unit intuitively in this case:
|
The dimension will not be stripped from the item, if we do that, then UoM improvements will not make it into OH4. It requires too many refactoring also in openhab-addons. |
Is there a reason that OH can't use the unit associated with the QuantityType? Netatmo creates a QuantityType with the unit |
It snowed yesterday, and its starting to melt:
This is 0.004 in in the Netatmo app, but is 0.001 in basicUI. It should be 0.004 |
@robnielsen The issue with using the attached unit is that we don't know the unit e.g. when restoring data from persistence (because persistence stores only the numeric value, not the unit). Did you change the state description as suggested in the other issue ( |
@J-N-K, yes I could, but the issue is that changing to feet as the default is a breaking change, with no real benefit. |
@J-N-K & @rkoshak: If this is indeed a regression, does anything speak against changing the default unit from |
I don't care, this should be decided by those who use imperial units :-) |
Fully agree, that's why I also tagged @rkoshak. 😄 |
I also would vote for inches. |
I use imperial units and vote for inches. |
I don't have a strong opinion any way. Back when @J-N-K asked for my opinion on setting the defaults I thought it would make sense to have the defaults somewhat match the metric defaults. Since meters is the default for length and it makes no sense to choose yards as the imperial default I compromised on feet. As has always been the case, if the default isn't right, it can be overridden through the state description (or hopefully the new UoM approach in OH 4). Ultimately you'll have someone who isn't happy. For weather you want inches. For the milage on you car you want miles. No default is going to work for everyone. But I wonder if the default for metric should be considered. Maybe cm makes more sense there? Ultimately I'm more about consistent than anything. |
If we go back to |
That's for me the strongest argument here - backward compatibility. |
What about area? It is currently sq. ft., but was not set originally. Shall we change that to sq. in., too? |
Sq ft is the most commonly used unit for area in my experience. |
The default imperial unit for Length is Inches (see https://www.openhab.org/docs/concepts/units-of-measurement.html), but now it's reporting units in feet. It has been inches since openHAB 1.
The text was updated successfully, but these errors were encountered: