Fix set_target_temperature() when called with 126.5#130
Fix set_target_temperature() when called with 126.5#130rotdrop wants to merge 1 commit intohthiery:masterfrom
Conversation
This happens if any of the preset modes eco or comfort are set to off in the Fritzbox UI for a thermostat, e.g. the 302. Fixes hthiery#129.
b010982 to
c54f814
Compare
| @@ -306,7 +306,7 @@ def set_target_temperature(self, ain, temperature, wait=False): | |||
|
|
|||
| if temp < 16: | |||
There was a problem hiding this comment.
| if temp < 16: | |
| if temp < 16 or temp == 253: |
| if temp < 16: | ||
| temp = 253 | ||
| elif temp > 56: | ||
| elif temp > 56 and not temp == 253: |
There was a problem hiding this comment.
| elif temp > 56 and not temp == 253: | |
| elif temp > 56: |
I actually had the Can you change it to your liking (then just go ahead!) or is my interaction required? |
|
The part about "if" or "if not" was more an opinionated one (not crucial) but that we need a test is a necessary one, so we proof that the bug is fixed and avoid possible regressions in the future |
This happens if any of the preset modes eco or comfort are set to off in the Fritzbox UI for a thermostat, e.g. the 302.
Fixes #129.
Luckily 126.5 has an exact binary representation as floating point number ...