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
[jsscripting] Fix JS Quantity to Java QuantityType conversion #16106
Conversation
Regression from openhab/openhab-js#312. Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@jlaur That should fix it. I’ve created it from GitHub web and are not able to test it, so would be great if you could compile and deploy it and test it. |
@florian-h05 - thank you! I have now tested the fix, and it works perfectly. |
Fine, then let's merge this. |
Yes. Do you want to test this also while waiting for the 4.1.x branch to be created? I only did one basic test by successfully running a rule that was previously broken - and requiring one of the EDS thing actions having |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I don’t think that’s necessary. However I wonder if we should provide a backward compatibility layer so that the conversion still works for older versions of the library. Though I would expect every user that has openhab-js installed manually to upgrade it to the latest version, and as the library had no breaking changes for nearly a year now, nothing should hold back from upgrading to the latest version. You only get plenty of fixes and some new features. |
I'm not sure it's relevant in 4.1 to older versions of openhab-js than the version bundled with 4.1. I don't know if it it's relevant or even possible to support newer versions of openhab-js in 4.0 (in case of manual upgrade of openhab-js without upgrading to 4.1)? |
Not really, there is no reason to not upgrade to the latest openhab-js when moving to openHAB 4.1.
That’s a good question. openhab-js still works on 4.0, but the automatic type conversion for Quantity will not work for the latest version. Personally, I’d vote no keep this PR as is, and require users to upgrade their manually installed openhab-js to the latest version when moving to openHAB 4.1. For 4.0 users that upgrade to the latest version of the library, I would say, that only the latest openHAB release provides full compatibility with the latest version of the library and they should please upgrade openHAB. |
Regression from openhab/openhab-js#312. Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
…ab#16106) Regression from openhab/openhab-js#312. Signed-off-by: Florian Hotze <florianh_dev@icloud.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Regression from openhab/openhab-js#312.
Fixes openhab/openhab-js#313,