HERE Travel Time
The here_travel_time
sensor provides travel time from the HERE Routing API
Setup
You need to register for an API key by following the instructions in the API Developer Guide
HERE offers a Limited Plan which includes 1000 free transactions per day. If you are not updating sensors on demand, you can track 3 routes without exceeding the limit.
You can provide payment details if you want to pay for unlimited transactions. Be aware that the amount of transactions included for free in the paid plan might be less than the 1000 transactions per day in the free plan. More information can be found on the pricing page
配置
要将 HERE Travel Time integration 添加到您的 Home Assistant 实例中,请使用此 My 按钮:
手动配置步骤
如果上述 My 按钮不起作用,您也可以手动执行以下步骤:
-
浏览到您的 Home Assistant 实例。
-
转到
设置 > 设备与服务。 -
在右下角,选择
Add Integration 按钮。 -
从列表中选择 HERE Travel Time。
-
按照屏幕上的说明完成设置。
Notes:
- Origin and Destination can be the address or the GPS coordinates of the location. For a dynamic configuration you can also enter an entity id which provides this information in its state, an entity id with latitude and longitude attributes, or zone friendly name (case sensitive).
选项
HERE Travel Time 的选项可以通过用户界面设置,具体步骤如下:
- 浏览到您的 Home Assistant 实例。
- 转到 设置 > 设备与服务。
- 如果配置了多个 HERE Travel Time 实例,请选择您想配置的实例。
- 选择集成,然后选择 配置。
Dynamic configuration
Tracking can be set up to track entities of type device_tracker
, zone
, sensor
, input_select
, input_text
and person
. If an entity is placed in the origin or destination then each time the platform updates, it will use the latest location of that entity. This means it will directly use its location if possible or try to resolve entity values until it finds a valid set of coordinates. You can put several destinations as options of an input_select
and define that as the destination.
# Example entry for configuration.yaml
input_select:
here_destination_preset:
options:
- zone.home
- zone.office
- zone.somewheredefault
-
device_tracker
- If the state is a zone, then the zone location will be used
- If the state is not a zone, it will look for the longitude and latitude attributes
-
person
- If the state is a zone, then the zone location will be used
- If the state is not a zone, it will look for the longitude and latitude attributes
-
zone
- Uses the longitude and latitude attributes
-
sensor
- If the state is a zone, then will use the zone location
- If the state is a name of another entity it will recursively resolve entity states until if finds a valid set of coordinates
-
input_select
- If the state is a zone, then will use the zone location
- If the state is a name of another entity it will recursively resolve entity states until if finds a valid set of coordinates
-
input_text
- If the state is a zone, then will use the zone location
- If the state is a name of another entity it will recursively resolve entity states until if finds a valid set of coordinates
Updating sensors on-demand using Automation
You can also use the homeassistant.update_entity
action to update the sensor on-demand. For example, if you want to update sensor.morning_commute
every 2 minutes on weekday mornings, you can use the following automation:
automation:
- alias: "Commute - Update morning commute sensor"
initial_state: "on"
triggers:
- trigger: time_pattern
minutes: "/2"
conditions:
- condition: time
after: "08:00:00"
before: "11:00:00"
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
actions:
- action: homeassistant.update_entity
target:
entity_id: sensor.morning_commute