mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
* #3829 - Fixed type LowHighTuple doesn't define __round__ method issue when Nest is operating in range mode * Testing if temperature is a tuple instead int or float
This commit is contained in:
parent
c54476b62f
commit
76598bc4d2
@ -135,7 +135,11 @@ class NestTempSensor(NestSensor):
|
|||||||
if temp is None:
|
if temp is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return round(temp, 1)
|
if isinstance(temp, tuple):
|
||||||
|
low, high = temp
|
||||||
|
return "%s-%s" % (int(low), int(high))
|
||||||
|
else:
|
||||||
|
return round(temp, 1)
|
||||||
|
|
||||||
|
|
||||||
class NestWeatherSensor(NestSensor):
|
class NestWeatherSensor(NestSensor):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user