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

Extend min/max/step with rangeUnit #4460

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lsiepel
Copy link
Contributor

@lsiepel lsiepel commented Nov 21, 2024

A common scenario for a thermostat's is that they have a limited operation range. To support these ranges the xml thing type structure has min, max and step xml attributes. After the introduction of UoM, these attributes where not adapted. Binding's now typically have a state pattern of %unit% and a unitHint set. The min/max/step lack a unit so it is not known to what unit it relates.

This PR adds a unitRange xml attribute that holds the unit that represents used unit for min, max and step.

  • Extend XML
  • Extend AbstractStorageBasedTypeProvider.java
  • Extend StateDescriptionFragmentImpl.java
  • Adapt tests
  • Validation

Fixes: #4432

Signed-off-by: Leo Siepel <[email protected]>
@lsiepel lsiepel changed the title First part Extend min/max/step with rangeUnit Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ranges (min,max,step) should be provided with a unit
1 participant