-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
Description
The problem
Since upgrading to 2025.5.0, all my travel time entities are set to Unknown and I have the following in my logs:
Logs
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 132, in __call__
return self.type(v)
~~~~~~~~~^^^
ValueError: could not convert string to float: '...'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 384, in _exec
v = func(path, v)
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 779, in validate_callable
return schema(data)
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 137, in __call__
raise CoerceInvalid(msg)
voluptuous.error.CoerceInvalid: expected float
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 205, in __call__
return self._compiled([], data)
~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 256, in _run
return self._exec(self._compiled, value, path)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 386, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
voluptuous.error.AllInvalid: invalid latitude
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 956, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1304, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/google_travel_time/sensor.py", line 259, in async_update
destination=convert_to_waypoint(self.hass, self._resolved_destination),
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/google_travel_time/helpers.py", line 39, in convert_to_waypoint
vol.Schema(cv.gps(formatted_coordinates))
~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 930, in __call__
raise e if self.msg is None else ExactSequenceInvalid(self.msg)
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 928, in __call__
v = type(v)(schema(x) for x, schema in zip(v, self._schemas))
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 928, in <genexpr>
v = type(v)(schema(x) for x, schema in zip(v, self._schemas))
~~~~~~^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 209, in __call__
raise er.MultipleInvalid([e])
voluptuous.error.MultipleInvalid: invalid latitude
I assume you need to include vol.MultipleInvalid
in the exception handler in convert_to_waypoint
, or maybe switch to just vol.Invalid
. Using latlngs is a workaround for now.
The release note only says:
Google has deprecated the Distance Matrix API. The new Routes API does not provide the state attributes Destination addresses and Origin addresses anymore.
But I think that should give a little more guidance, e.g.:
You must enable the Routes API in your Google Cloud project, and if your API key is restricted, you must update it to allow the Routes API instead of the Distance Matrix API.
Also, adding a new entry to the integration when all other entries are disabled doesn't enable the device, which caused me a bit of confusion until I randomly enabled one of the other entries.
What version of Home Assistant Core has the issue?
2025.5.0
What was the last working version of Home Assistant Core?
2025.4.5
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Google Maps Travel Time
Link to integration documentation on our website
https://www.home-assistant.io/integrations/google_travel_time/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response