This repository was archived by the owner on May 17, 2021. It is now read-only.
bugfix: padding of FHT temperature control hex string #5037
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The FHT binding would not send correct control commands for low temperature values.
(
Presumably, this bug was hidden for quite a long time, since virtually nobody sets low temperatures to heat their homes :-)
)
Detailed bug description
Temperature control command are hex strings following the "FHT80b syntax: THHHHCCAA" given in http://culfw.de/commandref.html#cmd_T. (Note: Temp commands can only be sent to FHT80b devices, i.e. the buggy method setDesiredTemperature(...) will not be called for commands requiring other syntax.)
Low temp values were converted to one-digit hex strings, whereas two-digit hex-strings are required, cf. the trailing AA part of the command string.