testing the component, I was wondering if we can set a prefix in the config, so the created sensors get a default prefix. We can do so eg in life360, and I seem to recall another HA setting were we can do this natively. Cant find it right now… sorry.
Not sure if that applies to Here though, so please have a look if possible?
thanks
In contrast to life360 here_travel_time does only create one single sensor. You can define the name by providing the name property.
Does that answer your question?
Ok I will.
btw the prefix for life360 I referred to is something different, and has to do with the specificities of the integration Removed integration - Home Assistant
a better example would be the enhanced sun component by @pnbruckner I use with a entity_namespace: astral so all these sensors are distinguished from any other sensors the native system components create. Also, and that is more of a Lovelace frontend thingy, I can use that with the cool auto-entities cards for example, selecting all entities alike easily.
Hope this goes to
btw did I mention the Here travel time sensors display beatifully on the waze custom card. Don’t think I did.
Well they do!
edit
the namespace works perfectly! cool. Whats even better is that my Here sensors are initialized and populated directly after restart, while the Waze sensors take a long time to do so, up to a few minutes sometimes.
2020-01-07 18:12:00 ERROR (MainThread) [homeassistant.components.here_travel_time.sensor] The state of device_tracker.life360_name is not a valid set of coordinates: not_home
shouldn’t this be handled in the component? or at least take it down to a warning?
This is actually the component itself giving this message. I did put in there as an error rather than warning because the entity (device_tracker.life360 in this case) gives a wrong input which means the next update can not work at all. In my point of view it could be a warning if the component could revert to some backup.
Now for the error itself:
Can you provide (also as a PM if you like) the complete state (including attributes) of device_tracker.life360 at the time of the error? If you have history enabled you should be able to track it down.
Hey… just got beta 0.104.0b0. and got my new API key to replave previous.
It’s working but getting errors in my log.
Log Details (ERROR)
Thu Jan 09 2020 11:37:13 GMT+1100 (Australian Eastern Daylight Time)
Update for sensor.travel_to_home fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/here_travel_time/sensor.py", line 304, 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 "/usr/src/homeassistant/homeassistant/components/here_travel_time/sensor.py", line 409, in update
herepy.RouteMode[traffic_mode],
File "/usr/local/lib/python3.7/site-packages/herepy/routing_api.py", line 131, in car_route
return self._route(waypoint_a, waypoint_b, modes, departure)
File "/usr/local/lib/python3.7/site-packages/herepy/routing_api.py", line 67, in _route
response = self.__get(self.URL_CALCULATE_ROUTE, data, RoutingResponse)
File "/usr/local/lib/python3.7/site-packages/herepy/routing_api.py", line 36, in __get
json_data = json.loads(response.content.decode('utf8'))
File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I am getting the following error message: 2020-01-10 14:45:45 ERROR (MainThread) [custom_components.here_travel_time.sensor] Invalid credentials. This error is returned if the specified token was invalid or no contract could be found for this token.
0.104 is released and with it the new api keys can be used. This means new users who want to use HERE for the first time are now able to use the integration again!