Merge pull request #2086 from home-assistant/time_travel_fix

Round minutes to integer in google travel time, Fix issue #2080
This commit is contained in:
Daniel Høyer Iversen 2016-05-16 11:45:43 +02:00
commit 8e766daa11

View File

@ -138,7 +138,7 @@ class GoogleTravelTimeSensor(Entity):
"""Return the state of the sensor."""
try:
res = self._matrix['rows'][0]['elements'][0]['duration']['value']
return res/60.0
return round(res/60)
except KeyError:
return None