Skip to content

HERE travel time with publicTransportTimeTable mode does not work in 0.108 #33995

Closed
@zhulik

Description

The problem

After update to 0.108 all my HERE travel time sensors that use mode: publicTransportTimeTable stopped working and show unknown state.

Environment

  • Home Assistant Core release with the issue: 0.108.2
  • Last working Home Assistant Core release (if known): 0.107.x
  • Operating environment (Home Assistant/Supervised/Docker/venv): Docker
  • Integration causing this issue: HERE travel time
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/here_travel_time

Problem-relevant configuration.yaml

sensor:
  - platform: here_travel_time
    api_key: "KEY"
    name: XXX to home by public transport
    origin_entity_id: person.XXX
    destination_entity_id: zone.home
    mode: publicTransportTimeTable
    route_mode: fastest
    traffic_mode: true

Traceback/Error logs

home-assistant   | herepy.routing_api.InvalidInputDataError: Time Table Transit Routing is only supported with departure or arrival time specified.
home-assistant   | 2020-04-11 00:14:55 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.home_to_work_by_public_transport fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
home-assistant   |     await self.async_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/components/here_travel_time/sensor.py", line 326, in async_update
home-assistant   |     await self.hass.async_add_executor_job(self._here_data.update)
home-assistant   |   File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/usr/src/homeassistant/homeassistant/components/here_travel_time/sensor.py", line 449, in update
home-assistant   |     departure=departure,
home-assistant   |   File "/usr/local/lib/python3.7/site-packages/herepy/routing_api.py", line 241, in public_transport_timetable
home-assistant   |     return self._route(waypoint_a, waypoint_b, modes, departure, arrival)
home-assistant   |   File "/usr/local/lib/python3.7/site-packages/herepy/routing_api.py", line 67, in _route
home-assistant   |     response = self.__get(self.URL_CALCULATE_ROUTE, data, RoutingResponse)
home-assistant   |   File "/usr/local/lib/python3.7/site-packages/herepy/routing_api.py", line 40, in __get
home-assistant   |     raise error_from_routing_service_error(json_data)

Additional information

The documentation says that the default value for departure is now, so it seems like it does not work anymore. If I try to use now as a value for departure, i see this in the logs

home-assistant   | 2020-04-11 00:03:18 ERROR (MainThread) [homeassistant.config] Invalid config for [sensor.here_travel_time]: Invalid time specified: now for dictionary value @ data
['departure']. Got 'now'. (See /config/sensors.yaml, line 268). Please check the docs at https://www.home-assistant.io/integrations/here_travel_time

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions