Skip to content

Comments

Fixed the dead band adjustment #117

Open
wir3z wants to merge 4 commits intodkilgore90:developfrom
wir3z:develop
Open

Fixed the dead band adjustment #117
wir3z wants to merge 4 commits intodkilgore90:developfrom
wir3z:develop

Conversation

@wir3z
Copy link

@wir3z wir3z commented Nov 17, 2024

Previously, I had made the dead band adjustment to increase the cool or decrease the hot set points the amount to ensure there was 1.5C/2.7F of dead band per the API documentation.

I was seeing issues which were spawning from rounding on the heat/cool points when at that dead band threshold. I would try to bump up the cool set point by the delta, and get a "invalid cool set point" response from the Google API.

I've changed the code to now increase the cool set point by the dead band + heat point or decrease the heat set point by cool point - dead band to ensure there is at least the dead band of temperature difference.

The app will now properly round to 1-decimal place when setting the request back to Google to prevent larger fractional temperatures.

…ol set point to be increased to meet the deadband requirement. Previously, extra rounding decimal places could result in Google rejecting the new cool set point due to that rounding.

- Calculate the deadband using double to match the app and round to 1-decimal place
- Round the heat and cool setpoints before sending to Google to prevent the large amount of decimal places
…ding does not cause a conflicting value that is rejected by the Google API.
…ew driver display not allowing decimal points in "numbers".
….0.119 new driver display not allowing decimal points in "numbers"."

This reverts commit e541cd7.
@wir3z
Copy link
Author

wir3z commented Nov 19, 2024

Hang tight on this PR. Something is still off when trying to set a temperature that needs to move the dead band. Need to log a bit more data....

@wir3z
Copy link
Author

wir3z commented Nov 21, 2024

OK, seems that this fixes one of the issues with the dead band. The other time seems like it's caching previous values and then rejecting the cool set point.

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