Estimated reading time: 10 minutes

Imagine you start your day and immediately know how long it will take you to get to work. Or you're on your way home and want to find the quickest route to avoid traffic jams. With Home Assistant and Waze you can achieve exactly that! In this blog article, I'll show you how to keep an eye on your journey time and use the best routes thanks to real-time information.

People who already use Home Assistant for lighting, sensors, cameras or automation often think of devices within their own four walls first. But Home Assistant can control much more than just the home. With Waze integration, the daily commute to work, the journey home or even the arrival of family members suddenly become part of home automation.

Right here comes Waze Travel Time into play. The integration connects Home Assistant with Waze's traffic data and makes it possible to use current travel times between two locations directly as a sensor in Home Assistant. This not only makes it possible to display travel times, but also to create intelligent automations based on real traffic conditions.

For detailed instructions and explanations of all configuration options, I recommend watching the YouTube video linked below. This video goes into detail about each individual setting, providing you with comprehensive instructions on how to set everything up correctly. Any code from the video can be found in this article, so you can use it directly without having to type it out.

What is Waze anyway?

Waze is a navigation app used by millions of users worldwide. Unlike traditional navigation systems, Waze is heavily based on community data. Users report traffic jams, roadworks, accidents, police checks or closed roads directly via the app.

This provides Waze with an enormous amount of live data about the current traffic situation. The app can use this information to calculate faster alternative routes and predict arrival times as accurately as possible.

What is particularly interesting for Home Assistant is that not only the route itself can be used, but above all the calculated journey time.

Why combine Home Assistant & Waze?

Home Assistant is known for its flexibility and automation options in your smart home. In combination with Waze, the popular navigation service, you can get traffic information directly into your home and use it for your daily journeys. Whether you're driving to work or home, you'll always get the latest traffic information - without having to open the app all the time.

Create small entities on your dashboard for on the go on your smartphone or the tablet on the wall at home and know exactly how long you will need and react accordingly quickly.

What does the Waze Travel Time integration do?

The integration creates a sensor in Home Assistant that continuously calculates how long a journey between two defined locations would currently take.

Different sources can be used as the starting point and destination:

  • Fixed addresses
  • GPS coordinates
  • Zones from Home Assistant
  • Device tracker
  • Person entities
  • Dynamic sensors

This creates a very flexible system.

A classic example would be:

  • Start: At home
  • Target: Workplace

The sensor then shows, for example:

  • 18 minutes in the early morning
  • 32 minutes during rush hour
  • 20 minutes in the evening

Although the start and destination never change, the journey time is constantly changing depending on the current traffic situation.

What is Home Assistant?

Home Assistant is an open-source platform for home automation that aims to connect all devices in the home and control them centrally. It was developed to provide a unified user interface and simple, flexible control for a wide range of smart home devices from different ecosystems. Here are some points in favor of Home Assistant:

  1. CompatibilityHome Assistant supports thousands of devices and services from various manufacturers, including lighting, air conditioning, heating, cameras, weather sensors, voice assistants and more.
  2. Local controlUnlike many commercial smart home platforms that rely on cloud services, Home Assistant runs locally on your network. This means increased privacy and reliability, as your smart home devices work even without an active internet connection.
  3. Automation and scenesOne of the main features of Home Assistant is the ability to create complex automations and scenarios. For example, you can have lights turn on automatically when it gets dark, or turn on the heating when the temperature drops below a certain level.
  4. Simple user interfaceHome Assistant offers a user-friendly interface that makes it easy to monitor and control devices. This interface is fully customizable.
  5. Integration with voice assistantsHome Assistant can be integrated with voice assistants such as Amazon Alexa or Google Assistant to enable voice-controlled control of your smart home devices.
  6. Open source and community-drivenSince Home Assistant is open source, it is supported by an active community that is constantly developing new integrations and improving existing ones.
  7. Data protection and securityAs a locally running platform, Home Assistant has the advantage that the data remains within its own network. This protects privacy and increases security compared to cloud-based solutions.

In summary, Home Assistant is a powerful and flexible solution for those who want to design their own smart home and control their devices centrally, regardless of the manufacturer or ecosystem.

How does it work?

With the Waze Travel Time integration in Home Assistant, you receive real-time information about the travel time to your preferred destinations. The integration analyzes current traffic data, takes into account traffic jams, accidents and other obstacles and provides you with the fastest route. Home Assistant can then display this information directly on your dashboard or even send you a notification.

Waze Dashboard Element
This is what it looks like on my dashboard with a mushroom chip.

Step 1: Set up Waze Travel Time integration

First you need to set up the Waze Travel Time integration in Home Assistant. This is very easy:

  1. Open Home Assistant:
    Log in to your Home Assistant dashboard.
  2. Add integration:
    Go to SettingsIntegrationsAdd integration. Search for "Waze Travel Time" and add it.
  3. Set goals:
    Once the integration is activated, you define your start and destination locations. You can specify both your Home address as well as your Workplace as targets.

Notes:

  • If no unit system is specified, the integration uses the unit system configured in your Home Assistant instance.
  • The starting point and destination can be the address or the GPS coordinates of the location. Use the following format for the coordinates: 52.5200, 13.4050. Make sure that the coordinates are separated by a comma. They must not contain any letters.
    You can also enter an entity ID that provides this information in its state, an entity ID with the attributes latitude and longitude or a zone-friendly name (case-sensitive).

Example for the configuration in YAML (but you can do it from UI):

sensor:
- platform: waze_travel_time
name: "Travel time to work"
origin: "Your home address"
destination: "Your work address"
region: "EU"

Here you specify that Home Assistant calculates the travel time from your home address to your workplace in the "EU" region. Of course, you can also select other regions such as "NA" (North America) or "IL" (Israel).

Step 2: Display real-time information on your dashboard

As soon as the integration is set up, you can display the journey time on your Home Assistant dashboard. You have various options for displaying the information, e.g. as a simple text display or as a visual element such as a progress bar. This allows you to see at a glance how long you will be on the road.

Example: You open your smart home app in the morning and see on the dashboard: "Travel time to work: 35 minutes". This saves you time because you don't have to open the Waze app to check the current traffic situation.

Step 3: Set up notifications for travel times

You can configure Home Assistant to send you notifications with the current travel time - for example, just before you leave the house.

Example of automation:

automation:
  - alias: "Travel time notification in the morning"
    trigger:
      - platform: time
        at: "07:00:00"
    action:
      - service: notify.mobile_app_your_phone
        data:
          message: "The current travel time to work is {{ states('sensor.travel_time_work') }} minutes."

With this automation, you receive a message on your smartphone every morning at 7 a.m. telling you how long your journey to work will take. This allows you to decide immediately whether you need to leave earlier or have more time.

Step 4: Use alternative routes and traffic information

Waze not only provides you with the current journey time, but also shows you alternative routes if there are traffic jams or accidents on the way. You can integrate this information into Home Assistant and have various route options displayed.

Example of multiple routes:

sensor:
  - platform: waze_travel_time
    name: "Alternative route to work"
    origin: "Your home address"
    destination: "Your work address"
    region: "EU"
    options: "avoid tolls"

In this example, you avoid toll roads and are shown the best alternative route. Home Assistant then shows you which route you should take to get the fastest journey time.

Step 5: Automate travel time based on conditions

With Home Assistant, you can automate your journeys even further. You can set up conditions that only send you a notification if the journey time exceeds a certain value. This way, you are only notified when it is really necessary.

Example of a conditional notification:

automation:
  - alias: "Warning for long travel time"
    trigger:
      - platform: numeric_state
        entity_id: sensor.fahrzeit_arbeit
        above: 45
    action:
      - service: notify.mobile_app_your_phone
        data:
          message: "The travel time to work is over 45 minutes. Allow enough time!"

In this example, you are only warned if the journey time to work is longer than 45 minutes. This gives you the opportunity to set off in good time and avoid traffic jams.

Are there any disadvantages?

Like many cloud services, Waze integration is not completely independent of external systems.

The data ultimately comes from Waze and is retrieved via corresponding interfaces. If there are changes or failures there, the integration can cause temporary problems. In the past, for example, users have reported connection problems, API changes or discrepancies between the journey times displayed in Home Assistant and the actual Waze app.

Even with dynamic GPS positions, unexpected results can occasionally occur if, for example, a device's location data is not updated correctly.

In normal everyday life, however, the integration works reliably for most users and has been one of the most popular traffic integrations within Home Assistant for years. The official Home Assistant documentation lists it as an integration for travel time calculations based on Waze traffic data.

YouTube video implementation

Conclusion

The Waze Travel Time integration expands Home Assistant to include an area that many smart home users don't even have on their screens at first: the daily commute to work and the current traffic situation.

Instead of just knowing, where Home Assistant can calculate where someone is located, when that person arrives. This is exactly what makes many automations much more intelligent.

Whether for heating control, outdoor lighting, traffic jam notifications, family dashboards or scheduling appointments - the possibilities are hugely diverse. The use of real-time traffic data creates a smart home that not only reacts to movements in the house, but also to what happens outside your own four walls.

For many users, Waze is therefore one of the integrations that quickly becomes indispensable once set up and provides real added value on a daily basis.

The product display was implemented using the affiliate-toolkit WordPress plugin.

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.