Skip to content

Conversation

@MikeTheTux
Copy link
Contributor

Handle command REFRESH

Description

Measures and Recommendations are now cached in order to implement REFRESH command
Smaller improvements in state description and README.

Signed-off-by: Michael Weger <weger.michael@gmx.net>
@MikeTheTux MikeTheTux requested review from Copilot and lsiepel October 7, 2025 18:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements support for the REFRESH command in the Ondilo binding by introducing caching for measures and recommendations. The implementation allows users to refresh channel values on demand using cached data.

Key changes:

  • Added caching mechanism for measures and recommendations to support REFRESH command
  • Updated display precision for numeric channels (ORP and pH trend channels changed from 1 decimal to 0 decimal places)
  • Improved code structure by consolidating measure processing logic

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
thing-types.xml Updated display patterns for ORP and trend channels to show whole numbers
OndiloHandler.java Added caching fields and implemented REFRESH command handling logic
OndiloBridge.java Refactored measure processing to use new consolidated method
README.md Updated example configurations and corrected formatting issues

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@MikeTheTux MikeTheTux added the enhancement An enhancement or new feature for an existing add-on label Oct 7, 2025
Signed-off-by: Michael Weger <weger.michael@gmx.net>
Signed-off-by: Michael Weger <weger.michael@gmx.net>
Signed-off-by: Michael Weger <weger.michael@gmx.net>
Signed-off-by: Michael Weger <weger.michael@gmx.net>
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

You need additional test time?

@MikeTheTux
Copy link
Contributor Author

please merge this one as well as #19268.

here is a openHAB 5.0.2 version of the change, if someone wants to do additional testing:

@lsiepel lsiepel merged commit 0e42e8c into openhab:main Oct 10, 2025
2 checks passed
@lsiepel lsiepel added this to the 5.1 milestone Oct 10, 2025
DrRSatzteil pushed a commit to DrRSatzteil/openhab-addons that referenced this pull request Oct 11, 2025
* handle command REFRESH

Signed-off-by: Michael Weger <weger.michael@gmx.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An enhancement or new feature for an existing add-on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants