The most comprehensive Tandem insulin pump integration for Home Assistant. Monitor your Tandem t:slim X2 pump with 45+ sensors, long-term statistics, glucose history graphs, insulin delivery tracking, pump settings, and full basal profile visibility — all directly in your smart home.
If you use a Tandem t:slim X2 insulin pump with Home Assistant, this is the only integration that gives you direct access to your pump data. No Nightscout relay, no third-party cloud — just your Tandem Source account connected straight to HA.
- 45 sensors covering glucose, insulin delivery, pump status, CGM stats, and pump settings
- Long-term statistics — glucose, IOB, and basal rate imported into HA's statistics engine for native Statistics Graph cards
- Stale data detection — sensors go
unavailablewhen your pump hasn't synced, preventing misleading flat lines - Smart polling — skips expensive API calls when no new data exists, reducing token usage
- Computed summaries — TIR, average glucose, GMI, daily insulin totals all computed locally from your pump events
- Full pump settings — see your active profile, basal schedule, Control-IQ config, alert thresholds
| Sensor | Description |
|---|---|
| Last glucose (mmol/L) | Latest CGM reading in mmol/L |
| Last glucose (mg/dL) | Latest CGM reading in mg/dL |
| Glucose delta | Change since previous reading |
| Average glucose (mmol/L) | Daily average (computed from CGM events) |
| Average glucose (mg/dL) | Daily average (computed from CGM events) |
| Time in Range | % of readings 70–180 mg/dL |
| Time below range | % of readings below 70 mg/dL |
| Time above range | % of readings above 180 mg/dL |
| Glucose SD / CV | Standard deviation and coefficient of variation |
| GMI | Glucose Management Indicator |
| Sensor | Description |
|---|---|
| Active insulin (IOB) | Insulin on board |
| Basal rate | Current basal rate (U/hr) |
| Last bolus | Most recent bolus amount and timestamp |
| Last meal bolus | Most recent meal bolus (units) |
| Total daily insulin | TDI for today |
| Daily bolus / basal totals | Split with basal percentage |
| Daily bolus count | Number of boluses today |
| Daily carbs | Total carbs entered today |
| Last carb entry | Most recent carb entry with timestamp |
| Sensor | Description |
|---|---|
| Control-IQ status | Open Loop / Closed Loop |
| Activity mode | Normal / Sleep / Exercise / Eating Soon |
| Pump suspended | Suspended / Active |
| Cartridge insulin | Remaining insulin (units) |
| Last cartridge change | Timestamp of last cartridge fill |
| Last site change | Timestamp (derived from cartridge fill) |
| Last tubing change | Timestamp of last tubing prime |
| Sensor | Description |
|---|---|
| Active basal profile | Profile name with full schedule as attributes |
| Control-IQ enabled | On / Off |
| Control-IQ weight | Configured weight (kg) |
| Control-IQ TDI | Configured total daily insulin |
| Max bolus | Maximum bolus limit (units) |
| Basal rate limit | Maximum basal rate (U/hr) |
| CGM high/low alerts | Alert thresholds (mg/dL) |
| BG high/low thresholds | BG alert thresholds (mg/dL) |
| Low insulin alert | Low reservoir threshold (units) |
| Sensor | Description |
|---|---|
| Last glucose update | When the last CGM reading was received |
| Last pump upload | When the pump last uploaded to Tandem Source |
| Last update | Integration data refresh timestamp |
| Pump serial number | Device serial |
| Pump model | Model name |
| Software version | Firmware version |
| CGM usage | Percentage of time CGM was active |
Three metrics are imported into HA's statistics engine every poll cycle:
- CGM glucose — for native Statistics Graph cards
- Insulin on board (IOB) — track IOB trends over days/weeks
- Basal rate — monitor basal delivery patterns
Or manually:
- Open HACS in Home Assistant
- Go to Integrations > 3-dot menu > Custom repositories
- Add:
https://github.com/jnctech/ha-tandem-pump - Category: Integration
- Click Add, find "Tandem t:slim Pump" and click Download
- Restart Home Assistant
Copy custom_components/carelink/ to your HA config/custom_components/ directory and restart.
- Settings > Devices & Services > Add Integration
- Search for "Carelink"
- Select Tandem t:slim as platform
- Enter your Tandem Source email, password, and region (EU/US)
- Set scan interval (default: 300 seconds)
- A Tandem t:slim X2 pump syncing to Tandem Source
- The Tandem t:slim mobile app connected to your pump (this is how data reaches Tandem Source)
- Home Assistant 2023.1.0 or later
A starter dashboard YAML with ApexCharts glucose and insulin graphs is included at examples/dashboard.yaml. It provides:
- Live glucose display with trend arrow
- 24-hour glucose history graph (pump CGM overlay)
- Insulin delivery graph (bolus + basal)
- All sensor values in a grid
This integration connects to the Tandem Source Reports API — the same API that powers the Tandem Source website. It decodes the proprietary binary pump event format (26-byte records with Tandem epoch timestamps) to extract all sensor data.
Data flow: Pump → Tandem t:slim mobile app → Tandem Source cloud → This integration → Home Assistant
The integration polls every 5 minutes (configurable) and:
- Checks lightweight metadata to see if new data exists (skip if unchanged)
- Fetches binary pump events (15 event types) when new data is available
- Decodes events, computes summaries, extracts settings
- Imports long-term statistics for HA's native graph cards
- Marks sensors as
unavailableif data is older than 30 minutes
This integration was forked from @yo-han's Carelink integration. The Medtronic Carelink code path is preserved but has not been tested under this fork. If you use a Medtronic pump, please use the original repository for verified support.
The integration can optionally upload glucose data to a Nightscout instance. Configure the Nightscout URL and API secret in the integration options. See TROUBLESHOOTING.md for Nightscout setup details.
See TROUBLESHOOTING.md for common issues including:
- Integration not loading
- Authentication failures
- Sensors stuck on "Unknown"
- Data not updating
Contributions welcome! See CONTRIBUTING.md for development setup, branch strategy, and testing requirements.
- Tandem Source integration by @jnctech
- Original Carelink integration by @yo-han
- Carelink API based on work by @ondrej1024
- Binary event format reference from tconnectsync by @jwoglom