mirror of
https://github.com/USA-RedDragon/badnest.git
synced 2025-01-18 18:10:42 +00:00
Round humidity changes to nearest 5% instead of down
This commit is contained in:
parent
5b3c70e0ec
commit
f1ebd8a2f7
@ -279,7 +279,7 @@ class NestClimate(ClimateDevice):
|
||||
|
||||
def set_humidity(self, humidity):
|
||||
"""Set new target humidity."""
|
||||
humidity -= humidity % ROUND_TARGET_HUMIDITY_TO_NEAREST
|
||||
humidity = int(round(float(humidity) / ROUND_TARGET_HUMIDITY_TO_NEAREST) * ROUND_TARGET_HUMIDITY_TO_NEAREST)
|
||||
if humidity < NEST_HUMIDITY_MIN:
|
||||
humidity = NEST_HUMIDITY_MIN
|
||||
if humidity > NEST_HUMIDITY_MAX:
|
||||
|
Loading…
x
Reference in New Issue
Block a user