Adjust temperature range of kumo accessories #115
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.
When the Kumo heater/coolers are added to Homebridge and Apple Home they display a range that does not correspond to their operating temperatures and is unintuitive for control as reasonable requested temps are right at the top of the range (or even beyond it). Currently this range seems to be a Homebridge default of 0-25 C (32-77 F).
Before:
This change sets the min and max temperatures to more relevant values (9-32 C and 50-90 F) which also slightly reduces the range, making selecting your desired temperature easier using the slider.
As the Celsius and Fahrenheit ranges are slightly different, I read the units to use from the kumo cloud api.
After:
I styled my code after the existing kumo accessories where logic is duplicated between them but am happy to refactor to reduce code duplication.
The temperature range implementation for this was based on the Nest Homebridge plugin's code for setting min and max temps. https://github.com/chrisjshull/homebridge-nest/blob/master/lib/nest-thermostat-accessory.js