-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vehicle tracker map.yaml
58 lines (58 loc) · 1.82 KB
/
Vehicle tracker map.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Itinerary tab to show the Estimated Time of Arrival of user0, disable the automatic gate, and see the position of user0
title: Itinerary
path: vehicle-tracker-map
icon: mdi:map
subview: false
badges: []
cards:
# Let each user disable your automatic gate
- type: entities
entities:
- entity: automation.automatic_gate
secondary_info: none
name: Automatic gate
icon: mdi:car-connected
# Show the ETA only if someone is driving towards home
- type: conditional
conditions:
- condition: or
conditions:
- condition: state
entity: input_text.user0_itinerary
state: arriving
- condition: state
entity: input_text.user0_itinerary
state: on_approach
card:
type: custom:mushroom-template-card
# Estimated time remaining
primary: >-
Time remaining : {{((state_attr('sensor.user0_travel_time',
'duration') * 60 - as_timestamp(now()) +
as_timestamp(states.sensor.user0_travel_time.last_updated))/60) |
round(0)}}min
# Estimated time of arrival
secondary: >-
Arrival :
{{(as_timestamp(states.sensor.user0_travel_time.last_updated) +
state_attr('sensor.user0_travel_time', 'duration') * 60) |
timestamp_custom('%H:%M')}}
icon: mdi:map-clock
entity: sensor.user0_travel_time
icon_color: blue
# Refresh travel time sensor on tap
tap_action:
action: call-service
service: homeassistant.update_entity
target:
entity_id: sensor.user0_travel_time
hold_action:
action: more-info
double_tap_action:
action: none
fill_container: false
# Show the positions history of user0 since 1 hour
- type: map
entities:
- entity: person.user0
hours_to_show: 1