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

added new field rangeUnit in StateDescription #4455

Closed
wants to merge 1 commit into from

Conversation

iamAden
Copy link

@iamAden iamAden commented Nov 17, 2024

Addressed Issue (1 mark):

The main issue tackled was the unclear handling of min, max, and step values in thermostat configurations when units like Celsius and Fahrenheit were used, causing inconsistencies. (Issue #4432)

What You Have Reengineered (1.5 marks):

  • StateDescription Class: Added a rangeUnit attribute to make unit handling explicit.
  • Tests and Supporting Classes: Updated related test cases and builder classes to incorporate and validate the rangeUnit.
  • Implementation Files: Adjusted StateDescriptionFragment and its builder classes to recognize and use rangeUnit.

Impact of Changes (1 mark):

These updates allow for clear, unit-aware configurations, ensuring thermostats behave consistently regardless of the unit system. Plus, everything still works as before if rangeUnit isn’t used.

Reengineering Strategy or Approach Used (1.5 marks):

A step-by-step refactoring approach was used to add rangeUnit without breaking existing code. Tests were updated to confirm everything functions smoothly, keeping things backward-compatible and ready for future enhancements.

@iamAden iamAden requested a review from a team as a code owner November 17, 2024 15:40
@iamAden iamAden closed this Nov 17, 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.

1 participant