TomTom Integration - traffic reports and your commute's travel time on your map

Hi all,

I’d like to share a custom integration that brings TomTom’s traffic reports into Home Assistant: jams, closed roads and lanes, roadworks, accidents, broken-down vehicles and the weather on the road - and, for a commute, how long the way takes right now. Everything comes from TomTom’s own APIs, with one free key.

It is the successor to my Blitzer.de and Lufop Radar integrations, and both of them live on inside it as optional speed camera sources.

Unofficial: not affiliated with, endorsed by or supported by TomTom.

The card

The integration serves its own card - nothing to download, nothing to register as a resource. One list per entry answering “what is on my way right now”, nearest first, with a map above it, or beside it, or folded into a single line with a pop-up.

On a live route the travel time stands large under the title, and the line under it says how much of it is traffic - green, yellow or red by thresholds of your choosing. Each report’s stretch of road is drawn on the map under its symbol, and TomTom’s traffic flow colours the roads while the card is on screen. The tiles come through the integration, so your key never reaches the browser.

Yours to style

The editor is the one the Annuals card has, with the same freedom: what the card shows and how every element is drawn - colour, font, size, symbol, background - is set in the visual editor. No YAML, no card-mod. That goes for the reports too: every kind has a symbol and a colour of your own choosing, on the map, on the band along the road and in the list.

What it reports

You add an area (a centre and a radius), a circle that follows a device tracker, or a route from a start to a destination. Every report becomes a geo_location entity with its road, the stretch it covers, its delay, a link to its page and a ready-made one-line summary.

TomTom files every report under one of thirteen kinds - a jam, a lane or road closed, roadworks, an accident, a broken-down vehicle, fog, rain, ice, wind, flooding and more - and each is a switch on the entry. A jam can be held back until its delay is worth a detour.

Features

Installation

  1. TomTom is in the HACS default list: in HACS, search for TomTom, download it and restart Home Assistant.
  2. Get a free key at developer.tomtom.com - it takes a minute, and no payment method is needed.
  3. Settings → Devices & Services → Add Integration → TomTom, paste the key and add your first area or route.
  4. Want blitzer.de or Lufop too? On the TomTom Settings entry, switch them on under Configure → Data sources.

Needs Home Assistant 2024.12 or newer.

Hi @somansch ,
Nice integration! Thanks for sharing.
The integration part works well but I cannot get the card to show up in the card selector. Routes to moniter are set up, entities are created but the card cannot be found - although the card.js files are indeed in the custom_components/tomtom_travel_time/frontend folder. What I’m missing or doing wrong?

1 Like

You can try a “hard-browser-refresh” (CTRL+SHIFT+R).

Amazing, this helped. Thanks @somansch !

1 Like

TomTom v1.1.0 is out – Release · Changelog

This one is mostly about the card: you decide what each kind of report looks like, and a new bar lets you hide and show kinds with a click.

New

  • :artist_palette: Your own symbol and colour per kind of report. Under Layout → General → Kinds of report the editor lists every kind TomTom and the sources you have switched on can report, each with a symbol and a colour. They apply on the map, on the band along the road, in the list and in the bar. Empty keeps everything as it was.
  • :abacus: A bar of the kinds. Between map and list, one symbol per kind currently on the map, with its count. A click hides that kind on the map and in the list, a second brings it back - remembered in your browser for that card.
  • :link: A link to every report. Every entity carries a url: for blitzer.de the camera’s page on their map, for TomTom the route planner zoomed to the stretch. With Map click opens the report on, a click on a symbol opens that page in a new tab.
  • :camera: Two camera sensors per entry. All speed cameras and New speed cameras count the reports from blitzer.de and Lufop - over the same reports the card shows, so “New speed cameras” is exactly the NEW badge. The in_range attribute adds how many there are in the circle beyond the configured count.
  • :world_map: Map theme. Under Layout → Map: light or dark regardless of the dashboard - a light map on a dark dashboard, for instance. Automatic follows the HA theme as before.
  • :automobile: Jam from this delay. In an entry’s optional settings: jams whose delay TomTom puts below that many minutes stay out - the thirty-second ones that make a commute look worse than it is. 0 reports every jam, as before.
  • :warning: Quota warning in two stages, like Lufop’s: a first repair at the share you set (80 % on new installations), a second when the projection reaches the whole free tier.
  • :star: blitzer.de’s stars and the refresh button each have a switch of their own now.

TomTom v1.2.0 is out – Release · Changelog

This one is about the map and the route planner: a button that takes an entry to Google Maps, and a planner that shows the traffic flow and the speed cameras before you save the route.

New

  • :round_pushpin: A Google Maps button on the map. Switch on Show the Google Maps button under Settings → Map and Google’s pin sits top right on the map, and on the minimal format’s pop-up. A click opens the entry in Google Maps in a new tab: a route with its start, stops and destination in the route planner, an area or a tracker at its centre. Off by default.

  • :vertical_traffic_light: The planner shows the traffic flow and the speed cameras. A calculated route is drawn the way the flow tiles colour the roads - green where traffic moves freely, yellow, orange or red where TomTom rates a delay, grey where it is closed - inside an orange edge. With blitzer.de or Lufop switched on, their cameras and checks along the route join the list, the map, the badges and the bar, so the preview shows what the route gets once saved. A saved live route keeps the traffic flow, in its own colour.

TomTom v1.3.0 is out – Release · Changelog

This one is about the free tier: what happens when TomTom has no requests left, and how to decide what the 2,500 Incident Details requests of a month are spent on.

New

:ring_buoy: A used-up quota no longer takes your entries down. TomTom counts its free requests per API. When one ran out, every entry went unavailable with “TomTom refused the API key” - routes and travel times included. Now the entries keep running on what they still get: an area or a tracker shows no TomTom reports for the time being, while the speed cameras from blitzer.de and Lufop and the traffic flow stay; a route keeps its reports with kind, place and delay. A repair names the API, and goes away with the first answer.

:placard: The card says what is missing. A line above the list, and above the pop-up’s, while reports or their details are missing, or while the last update failed.

:control_knobs: Detail lookups per route. Look up the reports’ details on a route’s form: switched off, the route costs no Incident Details request at all. Minutes between detail lookups lets the details follow in rounds - a new report shows at once, and several are looked up in one request. And a route now looks up only the reports it shows, not the kinds you switched off.

:abacus: A limit on the day’s Incident Details requests. Under TomTom Settings → Configure → Quota warning → TomTom: 80 a day by default, which makes the 2,500 last the month. 0 switches it off. Once the day’s limit is reached, a repair says so and when it ends.

:mobile_phone: Minimal format. The editor now offers what the pop-up draws - Traffic button, info line, refresh button - and hides the settings that format has no use for.

Fixed

:camera_with_flash: Speed cameras are no longer reported as new after every restart, and keep their entity ids.
:crescent_moon: A route’s hours past midnight belong to the day they began on.
:three_o_clock: The card reads a report’s time in Home Assistant’s time zone, and “just now” and NEW age between polls.
:world_map: The planner no longer saves an outdated preview, and confirms a saved route.

…and more, all in the changelog.

After updating

  • Home Assistant 2024.12 or newer is needed.
  • The day’s limit of 80 applies right away. A single area polled every 15 minutes sends 96 Incident Details requests a day - raise the number in the quota warning, or set 0.

:star: If TomTom is useful to you, a star on the repo is genuinely appreciated - it is how other people find it. And if it saves you a traffic jam now and then, I’d be glad about a coffee. :hot_beverage: