This guide covers how to create a live dashboard card that calculates your exact departure times for college drop-offs and pick-ups. It uses Waze for live traffic data and a shared Google Calendar to automatically find the start of the first class and the end of the last class each day.
Phase 1: Configure Live Traffic (Waze)
First, we need to set up a sensor that tracks the live driving time between your house and the college.
- Go to Settings > Devices & Services in Home Assistant.
- Click + Add Integration and search for Waze Travel Time.
- In the setup window:
- Origin: Enter
zone.home(or your specific starting address). - Destination: Enter the address of the college.
- Region: Select your local region.
- Origin: Enter
- Click Submit. This will generate a new sensor, typically named
sensor.waze_travel_time.
Phase 2: Connect the Class Schedule
Next, import the shared schedule using the Remote Calendar integration, which bypasses the need for full Google account authorization.
- On your computer, open Google Calendar, click the three dots next to the shared calendar, and select Settings and sharing.
- Scroll to the Integrate calendar section and copy the Secret address in iCal format (ensure it ends in
.ics). - In Home Assistant, go to Settings > Devices & Services and click + Add Integration.
- Search for Remote Calendar.
- Give it a descriptive name (e.g., “College Schedule”) and paste your
.icslink into the URL field. - Click Submit. Note the exact entity ID this creates (e.g.,
calendar.college_schedule).
Phase 3: Create the Departure Sensors
To calculate the drop-off and pick-up times based on the first and last events of the day, you must use a trigger-based template in your configuration files.
- Open your
configuration.yamlfile using the File Editor or Studio Code Server add-on. - Paste the following YAML block. Important: Replace
calendar.college_schedulewith the exact entity ID of your new remote calendar.
YAML
template: - trigger: # Updates every 15 minutes to keep travel time fresh - platform: time_pattern minutes: "/15" # Updates instantly if the calendar changes - platform: state entity_id: calendar.college_schedule action: # Fetches all events for today - action: calendar.get_events target: entity_id: calendar.college_schedule data: start_date_time: "{{ today_at('00:00') }}" end_date_time: "{{ today_at('23:59') }}" response_variable: agenda sensor: - name: "Leave for Drop-off" icon: mdi:car-arrow-right state: > {% set events = agenda['calendar.college_schedule']['events'] %} {% set travel = states('sensor.waze_travel_time') | int(0) %} {% if events | length > 0 and travel > 0 %} {% set first_start = events[0].start | as_datetime %} {{ (first_start - timedelta(minutes=travel)).strftime('%-I:%M %p') }} {% else %} No classes today {% endif %} - name: "Leave for Pick-up" icon: mdi:car-arrow-left state: > {% set events = agenda['calendar.college_schedule']['events'] %} {% set travel = states('sensor.waze_travel_time') | int(0) %} {% if events | length > 0 and travel > 0 %} {% set last_end = events[-1].end | as_datetime %} {{ (last_end - timedelta(minutes=travel)).strftime('%-I:%M %p') }} {% else %} No classes today {% endif %}
- Save the file.
- Go to Settings > System > Quick Reload (or click the power icon in the top right and select “Reload All YAML”) to activate the new sensors.
Note: Trigger-based sensors will display as “Unknown” immediately after a reload. They will populate with actual times the next time the 15-minute interval hits, or if you manually change the state of the calendar entity in Developer Tools to force an update.
Phase 4: Build the Dashboard UI
Finally, combine everything into a single, clean card on your dashboard.
- Navigate to your dashboard and click the pencil icon in the top right to enter edit mode.
- Click + Add card in the bottom right corner and select the Entities card.
- Set the Title to something relevant (e.g., “College Runs”).
- Add the following three entities to the card:
sensor.waze_travel_time(ETA to College)sensor.leave_for_drop_offsensor.leave_for_pick_up
- Click Save to place the finished grouping on your dashboard.
