A HACS-compatible custom integration for Home Assistant that periodically scrapes the public ITRA RunnerSpace profile page of a runner and exposes two sensors:
| Entity | State | Example |
|---|---|---|
sensor.itra_level_count |
ITRA index (integer) | 388 |
sensor.itra_performance_level |
Performance level (string) | "Intermediate 4" |
This integration scrapes HTML from itra.run. Please review the ITRA
Terms of Service and their robots.txt before using it.
Scraping may violate ToS. If ITRA ever provides an official public API, prefer
that over HTML scraping.
The default polling interval is 4 hours (minimum enforced: 3 hours) to avoid putting unnecessary load on their servers. Please be a polite consumer.
- Open HACS → Integrations → ⋮ → Custom repositories.
- Add
https://github.com/CrunkA3/ha-itraas an Integration repository. - Search for ITRA and click Download.
- Restart Home Assistant.
- Copy the
custom_components/itra/folder into your HAconfig/custom_components/directory. - Restart Home Assistant.
- Go to Settings → Devices & Services → Add Integration.
- Search for ITRA.
- Enter the fields:
| Field | Description | Example |
|---|---|---|
| Runner URL | Full ITRA RunnerSpace URL | https://itra.run/RunnerSpace/rohrhirsch.michael.5685748 |
| Update interval | Polling interval in seconds (min 10 800 = 3 h) | 14400 |
| User-Agent | Custom HTTP User-Agent (optional) | (leave empty for default) |
YAML-based setup is not supported for this integration. Please use the UI (Config Flow) to configure the runner URL and polling interval.
After a successful setup, the following entities are created:
sensor.itra_level_count → 388 (ITRA index integer)
sensor.itra_performance_level → "Intermediate 4" (performance level string)
The sensor.itra_performance_level entity exposes these extra attributes:
| Attribute | Description |
|---|---|
raw_html_snippet |
The raw HTML fragment containing the parsed elements |
last_updated_by_coordinator |
ISO-8601 timestamp of the last successful update |
automation:
- alias: "Notify on new ITRA level"
trigger:
- platform: state
entity_id: sensor.itra_performance_level
action:
- service: notify.mobile_app_my_phone
data:
message: "Your ITRA level changed to {{ states('sensor.itra_performance_level') }}!"| Problem | Solution |
|---|---|
Sensors show unavailable |
Check HA logs for network errors; verify the runner URL is accessible |
level_count is None |
ITRA may have changed their page layout; open a GitHub issue |
level shows unknown |
Same as above |
| Integration not loading | Ensure beautifulsoup4 is installed (HA installs it automatically via manifest.json) |
Enable debug logging in configuration.yaml:
logger:
default: warning
logs:
custom_components.itra: debug# Install dependencies
pip install beautifulsoup4 pytest
# Run tests
pytest tests/MIT — see LICENSE.