Skip to content
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

Fix changing temperature via Basic UI #2165

Conversation

chris922
Copy link
Contributor

@chris922 chris922 commented Jan 30, 2021

As described in openhab/openhab-webui#765 changing temperature via BasicUI fails as long as the widget in the sitemap doesn't have a label defined.

I debugged the issue on my openHAB instance (v3.0.0) and saw that the unit-symbol of the Item will not be used in case no label was defined and instead of this null will be returned.

Therefore I added a small check that will ensure that the unit-symbol of the item will be returned as long as no label is given.

Unfortunately I don't know how to test the changes, I tried replacing the corresponding JAR in the runtime directory, but seems that it doesn't work. If someone could give me some hints how I can check this in my running openHAB instance please let me know.

Anyway I added some unit-tests based on the information I was able to gather during debugging.

Fixes openhab/openhab-webui#765

@chris922 chris922 requested a review from a team as a code owner January 30, 2021 14:05
Signed-off-by: Christian Bandowski <christian@myvm.de>
@andrewfg
Copy link
Contributor

don't know how to test the changes, I tried replacing the corresponding JAR in the runtime directory

@chris922 it is some time since I last did it but as I recall you need to drop the jar file in the addons folder and then use the console bundle:install command..

https://www.openhab.org/docs/administration/console.html#using-the-console

@chris922
Copy link
Contributor Author

@andrewfg : I know how to do it for bundles like additional bindings.. but this here are changes at the openHAB core, so I am unsure if it is still the same way or if I will destroy my setup when I try to uninstall/remove something there to drop in this new JAR 🤔

@andrewfg
Copy link
Contributor

andrewfg commented Jan 30, 2021

I know how to do it for bundles like additional bindings

Its is a bit different for bindings and core jars..

  • for bindings: you just drop the jar in the addons folder
  • core jars: you drop it in the addons folder, and then run bundle:install

@andrewfg
Copy link
Contributor

^
PS and to reverse it you do bundle:uninstall

@andrewfg
Copy link
Contributor

^
PPS and experiment with bundle:list first

@chris922
Copy link
Contributor Author

chris922 commented Jan 30, 2021

Ahh nice, perfect. I stopped the bundle openHAB Core :: Bundles :: UI, dropped in my new JAR and started this bundle from my JAR.. aaaand: Issue seems to be solved, I can change the temperature using the BasicUI via Web :)

Thanks @andrewfg for supporting me how to test it

@kaikreuzer kaikreuzer added the bug An unexpected problem or unintended behavior of the Core label Jan 30, 2021
@kaikreuzer kaikreuzer added this to the 3.1 milestone Jan 30, 2021
Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for the fix, lgtm.

@kaikreuzer kaikreuzer merged commit d48646d into openhab:main Jan 30, 2021
@kaikreuzer kaikreuzer changed the title Fix changing temperature via BasicUI (#2091) Fix changing temperature via Basic UI Jan 30, 2021
@chris922 chris922 deleted the hotfix/2091_changing-temperature-basicui-fails branch January 31, 2021 16:58
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/sitemap-visibility-tag-seems-to-disable-setpoint-items/115767/9

@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/crazy-bevavior-in-basic-ui-oh3/114927/24

cweitkamp pushed a commit that referenced this pull request Feb 6, 2021
Signed-off-by: Christian Bandowski <christian@myvm.de>
@cweitkamp cweitkamp added UI User Interface patch A PR that has been cherry-picked to a patch release branch labels Feb 6, 2021
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/openhab-3-setpoint/112801/19

@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/set-temp-using-neohub-binding-in-basicui/132573/1

@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/openhab-3-4-release-discussion/142257/76

splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 11, 2023
Signed-off-by: Christian Bandowski <christian@myvm.de>
GitOrigin-RevId: d48646d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core patch A PR that has been cherry-picked to a patch release branch UI User Interface
Projects
None yet
5 participants