I can’t get this custom component to work. Tried to manually install the component and also using HACS. I’m running Hass.io, config check results in the following error:
Platform error sensor.here_travel_time - No module named 'herepy'
Been there…
If you install the component using HACS and have not yet restarted HA yet, but nevertheless have added the configuration for the component in the configuration.yaml HA doesn’t recognize the component yet.
To circumvent this you should restart HA first and just then add the config to the configuration.yaml
Is my observation correct and is this component not accepting a input_select as an entitiy_id ?
I have created a automation rule which sets my destination based on the day of the week, my current location etc. My ultimate plan was to set this input_select as the destination_entity_id, but it does not seem to work…
Can you send me the details of your config and automation either here or via PM?
I want to make sure I understand you correctly. It seems you have brought up a new use case!
Couldn’t agree more. I don’t use HA betas but am really looking forward now to 0.100!
This has been a bit of a game changer for me for location. Here Maps is by far my favourite maps provider and has been since the early days of Windows Phone.
Thank you.
PS. For anyone who doesn’t know and hasn’t checked it out, the Here app (Android, and I assume ios too) allow you to download whole countries for offline use. Very useful when travelling. No, I have nothing to do with Here, I just think it is very good.
Here is a stripped down version of what I created for this. (I removed some day related stuff. I work at geographically different office buildings throughout the week.)
My intention was to have it set automatically based on defaults while for example I can manually change my destination in the morning if I work at a different office today.
2019-10-04 22:53:20 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.reistijd fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 261, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 439, in async_device_update
await self.async_update()
File "/config/custom_components/here_travel_time/sensor.py", line 277, in async_update
await self._hass.async_add_executor_job(self._here_data.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/here_travel_time/sensor.py", line 361, in update
origin, destination, [self.route_mode, self.travel_mode, traffic_mode]
File "/usr/local/lib/python3.7/site-packages/herepy/routing_api.py", line 78, in car_route
return self._route(waypoint_a, waypoint_b, modes)
File "/usr/local/lib/python3.7/site-packages/herepy/routing_api.py", line 54, in _route
'waypoint1': str.format('{0},{1}', waypoint_b[0], waypoint_b[1]),
IndexError: list index out of range
I have checked the state of the newly created template sensor. It should be OK:
Thank you very much for the remarkably fast replies and update of the code. It worked. I don’t even need the template sensor. I am directly referencing the input_select entity. Now I can have this changed based on the day of the week along with my current location. The possibilities are endless. I could even change the destination based on my Google calendar entries. You ROCK!