Custom integration for Home Assistant that connects to the Speedtest Tracker API and exposes speed test results, statistics, and controls as sensors, binary sensors, and a button.
https://github.com/alexjustesen/speedtest-tracker
https://docs.speedtest-tracker.dev
- Add this repository as a custom repository to HACS:
- Use HACS to install the integration.
- Restart Home Assistant.
- Set up the integration using the UI:
- Download the integration files from the GitHub repository.
- Place the integration folder in the
custom_componentsdirectory of Home Assistant. - Restart Home Assistant.
- Set up the integration using the UI:
- Go to Settings → Devices & Services
- Click "Add Integration"
- Select Speedtest Tracker
- Enter:
- Base URL (e.g.
https://your-instance) - Bearer Token (see Getting a Bearer Token below)
- Scan interval
- Timeout
- SSL verification (optional)
- Webhook ID (a long random value is pre-filled — see Webhook Setup)
- Base URL (e.g.
The integration authenticates against your Speedtest Tracker instance using an API Bearer Token, generated from the Speedtest Tracker web UI (not from Home Assistant):
- Log in to your Speedtest Tracker instance.
- Open Settings → API Tokens (Personal Access Tokens).
- Create a new token, e.g.
home-assistant, and copy the generated value immediately — it is only shown once. - Paste this value into the Bearer Token field when setting up (or reconfiguring) the integration in Home Assistant.
Refer to the Speedtest Tracker documentation if the exact location of the API Tokens page differs for your installed version.
- Latest speed test monitoring (download, upload, ping)
- Detailed latency and jitter metrics
- Packet loss tracking
- Server information (name, location, country, ISP)
- Historical statistics (avg/min/max)
- Manual test execution (button)
- Smart polling with retry logic
- Webhook support for instant updates
- Separation of current test and statistics into two devices
- Download speed [Mbps]
- Upload speed [Mbps]
- Ping [ms]
- Packet loss [%]
- Ping jitter [ms]
- Download jitter [ms]
- Upload jitter [ms]
- Download latency (low / IQM / high) [ms]
- Upload latency (low / IQM / high) [ms]
- Download elapsed [ms]
- Upload elapsed [ms]
- Status (string)
- Last test time (as local time)
- Result URL
- Server (with attributes)
- Ping avg / min / max [ms]
- Download avg / min / max [Mbps]
- Upload avg / min / max [Mbps]
- Total results
- Healthy
- Scheduled
- Run speed test
Integration combines polling and webhook updates:
- Runs at configured scan interval
- If test status is
running:- values are not overwritten
- retry is scheduled after 10 seconds
- retries continue until test completes
- After triggering a test:
- refresh is scheduled after 10 seconds
- if still running → retry continues
- When webhook is triggered:
- integration performs immediate refresh
- If webhook is missed (e.g. HA offline):
- next polling cycle updates data
This ensures:
- no data loss
- no “N/A” states during running test
- near real-time updates
The webhook lets Speedtest Tracker (or any external automation) tell Home Assistant to refresh immediately when a test finishes, instead of waiting for the next poll.
The Webhook ID is a configurable field in the config flow (both initial setup and reconfigure). A long, random value is pre-filled automatically, similar to how the spoolman-active integration handles its webhook ID — you can accept it as-is or replace it with your own value.
Security note: the webhook endpoint is unauthenticated — anyone who knows the webhook ID can trigger it. Keep it a long, random string, don't share it publicly, and rotate it (via Reconfigure) if you suspect it has leaked.
If you're upgrading from an older version of this integration that already had an auto-generated webhook ID, that existing value is kept as-is and simply becomes editable — open Reconfigure if you want to change it, otherwise nothing changes for you.
After adding the integration:
- Open the Speedtest Tracker integration in Home Assistant
- Find the status sensor
- In attributes, locate:
webhook_idwebhook_url
Webhook endpoint format:
/api/webhook/<webhook_id>
Full example:
https://homeassistant.local:8123/api/webhook/xxxxxxxxxxxxxxxx
Configure your Speedtest Tracker (or external automation) to call this URL when a test finishes.
Speedtest Tracker returns result timestamps (updated_at) as plain strings with no timezone offset — the actual moment they represent depends entirely on that Speedtest Tracker instance's own APP_TIMEZONE setting, which has nothing to do with the timezone your Home Assistant runs in. Speedtest Tracker defaults to UTC unless its operator configured it otherwise, and even then the setting isn't always applied consistently (see alexjustesen/speedtest-tracker#1503) — so this can't be auto-detected via the API.
To get an accurate Last test time sensor, open the integration's Configure (options) dialog and pick how to interpret those timestamps:
- UTC (default) — matches Speedtest Tracker's own default; use this unless you know your instance's
APP_TIMEZONEwas changed. - Local — assumes the timestamps already match this Home Assistant's own configured timezone (this was the integration's old, hardcoded behavior).
- Custom timezone… — opens a searchable dropdown of IANA timezone names (e.g.
Europe/Prague) so you can match whateverAPP_TIMEZONEyour Speedtest Tracker instance actually uses.
If unsure, check the APP_TIMEZONE / DISPLAY_TIMEZONE environment variables of your Speedtest Tracker deployment and pick the matching option here.
- During running tests, last valid values are preserved
- Statistics are separated into a dedicated device for clarity
If you find this integration useful, you can support the development:
This project is licensed under the MIT License.
Copyright (c) 2026 metaathron
You are free to use, modify, and distribute this software in accordance with the MIT License.
If you find this project useful, attribution and a link back to the original repository are appreciated: https://github.com/metaathron/ha-speedtest-tracker
