it seems like the Here integration is not working. I get the following error when I try to add it:
I am using it fine, did you get the API key ? or could you you not get that far ?
Strange, I have had an API key for a long time (old version) so maybe thatās why it still works for me. Iāve just tried adding a new integration and it works fine
Sorry for bumping an old thread, but how do I convert the minutes to HH:MM (hours and minutes?).
Iām aware of template sensors, but not sure how to incorporate the conversation into this card.
type: custom:travel-time-card
entities:
- sensor.waze_travel_time_2
distance_units: miles
Hey,
is there a possibility to show the ālast updateā or ālast changedā status for the entities?
@Mariusthvdb I know that this is an old link, but if you give me a few hints it would be greatly appreciated.
I would like to know how hthe sensor.origin, sensor.destination and the sensor.route_planner were created.
A sample of each code would really help.
Again thank you for all the help you have given me in the past.
sure, its a bit complex, but works well:
- unique_id: here_destination
state: >
{% set select = states('input_select.destination') %}
{% if select == 'Thuis'%} {% set destination = 'zone.home' %}
{% elif select in ['Marijn','P2','P3','P4','P5','P6'] %}
{% set destination = 'person.' ~ select|lower %}
{% else %} {% set destination = 'zone.' ~ select|slugify %}
{% endif %}
{{destination}}
picture: >
{% set select = states('input_select.destination') %}
{% if select in ['Marijn','P2','P3','P4','P5','P6'] %}
{% set destination = 'person.' ~ select|lower %}
{{state_attr(destination,'entity_picture')}}
{% else %} /local/travel/destination.png
{% endif %}
attributes:
latitude: >
{% set select = states('input_select.destination') %}
{% if select == 'Thuis'%} {% set result = 'zone.home' %}
{% elif select in ['Marijn','P2','P3','P4','P5','P6'] %}
{% set person = 'person.' ~ select|lower %}
{% set result = 'zone.home' if states(person) == 'home' else
'person.' ~ select|lower %}
{% else %} {% set result = 'zone.' ~ select|slugify %}
{% endif %}
{% set lat = state_attr(result,'latitude') %}
{{lat}}
longitude: >
{% set select = states('input_select.destination') %}
{% if select == 'Thuis'%} {% set result = 'zone.home' %}
{% elif select in ['Marijn','P2','P3','P4','P5','P6'] %}
{% set person = 'person.' ~ select|lower %}
{% set result = 'zone.home' if states(person) == 'home' else
'person.' ~ select|lower %}
{% else %} {% set result = 'zone.' ~ select|slugify %}
{% endif %}
{% set lon = state_attr(result,'longitude') %}
{{lon}}
and the same for
- unique_id: here_origin
state: >
{% set select = states('input_select.origin') %}
{% if select == 'Thuis'%} {% set origin = 'zone.home' %}
{% elif select in ['Marijn','P2','P3','P4','P5','P6'] %}
{% set origin = 'person.' ~ select|lower %}
{% else %} {% set origin = 'zone.' ~ select|slugify %}
{% endif %}
{{origin}}
etcetc
so this relies on having those input_selectās, and person device_trackers with lat/long (which I have also set as possible from/to options in the input_select). Got to realize that person trackers in zone home do Not have a lat/long, so that is a reason I base those off the custom component Composite, which always sets the lat/long correctly, even when in zone home.
the final Here sensors are made by the integration,
and I have a script that updates the entities, so it doesnt have to poll constantly
script:
update_routeplanner_dynamic:
sequence:
service: homeassistant.update_entity
target:
entity_id:
- sensor.here_route_planner_distance
- sensor.here_route_planner_duration
and I can push the button in the dashboard.
originally, I had the route (itinerary below in the commented section) I the map, but that has been taken from usā¦ and never replaced by anything alike.
crd now is this:
type: entities
title: Routeplanner
card_mod:
class: class-header-margin
entities:
- input_select.origin
- input_select.destination
- entity: script.update_routeplanner_dynamic
action_name: Hernieuw
- type: custom:fold-entity-row
head:
type: section
label: Routebeschrijving
card_mod: &label
style: |
.label {
margin-left: 0px !important;
}
padding: 0
entities:
- type: custom:hui-element
card_type: markdown
card_mod:
style: |
ha-card {
box-shadow: none;
margin: 0px -16px;
}
content: >
{% set duur = states('sensor.here_route_planner_duration') %}
{% set afstand = states('sensor.here_route_planner_distance') %}
Van: {{states('input_select.origin')}} Naar: {{states('input_select.destination')}}
Duur: {{duur}} minuten, Afstand: {{afstand}} km.
- type: custom:fold-entity-row
head:
type: section
label: op Kaart
card_mod: *label
padding: 0
card_mod:
style: |
div#items {
margin: 16px -16px -16px -16px;
}
entities:
- type: custom:hui-element
card_type: map
card_mod:
style: |
ha-card {
box-shadow: none;
}
entities:
- sensor.here_origin
- sensor.here_destination
- type: custom:fold-entity-row
head:
type: section
label: Details
card_mod: *label
padding: 0
entities:
- entity: sensor.here_origin
name: Van
- entity: sensor.here_destination
name: Naar
# - sensor.here_route_planner_route
- entity: automation.update_travel_sensors
secondary_info: last-triggered
state_color: true
- entity: automation.update_travel_options
secondary_info: last-triggered
state_color: true
# - type: custom:fold-entity-row
# head:
# type: section
# label: Itinerary
# padding: 0
# entities:
# - type: custom:waze-card
# card_mod:
# style: |
# ha-card {
# box-shadow: none;
# }
# title: ''
# entities:
# - entity: sensor.here_route_planner
Thank you for all the information, you went way above what I had suspected.
Also thank you for your generous time in explaining this.
I copied the info to my text editor and will start to piece it together.
sure, and feel free to ask, youāre most welcome!