-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
Currency type UoM #3408
Comments
The challenge is exchange rates change so fast that any conversion will by necessity need to reach out to some cloud API. That would make currencies work completely different from all the other units which have a fixed conversion calculation. Given that I wonder if UoM is the correct or even a feasible way to handle this. Maybe something closer to how OH handles TTS or configs or a binding would be more appropriate. Some implementation questions:
|
https://exchangerate.host/#/#our-services Looks like a nice one and easy to integrate. But there are indeed a lot of questions regarding the modeling. |
Oh dear, I was just thinking of a static Number:Money data type in the first place. |
I had a look at the PR linked above. It proposes adding a new numeric type |
@kaikreuzer I think the currency issues should be discussed here. I found an interesting JavaDoc for
And this is of course correct, the exchange rate for €/$ is not the same as for $/€, because buying and selling has to be treated differently. But do we want it that complex of can we assume that |
Wasn't the initial use case more something like e.g. But if the currency symbols are available wouldn't it be easy to have a binding provide the factors |
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/oh4-uom-price-dimension/148332/2 |
I noticed there seems not to be any UoM type to reflect currencies or "money" the dimension is.
With dynamic power tariffs and such raising, these should be added fast before we have binding devs and users embark on any type of workaround in rules.
Related: #983
Related: #3282
The text was updated successfully, but these errors were encountered: