mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 05:05:09 +02:00
Round minutes to integer in google travel time, Fix issue #2080
This commit is contained in:
@@ -138,7 +138,7 @@ class GoogleTravelTimeSensor(Entity):
|
|||||||
"""Return the state of the sensor."""
|
"""Return the state of the sensor."""
|
||||||
try:
|
try:
|
||||||
res = self._matrix['rows'][0]['elements'][0]['duration']['value']
|
res = self._matrix['rows'][0]['elements'][0]['duration']['value']
|
||||||
return res/60.0
|
return round(res/60)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user