A custom Lovelace card for Home Assistant that displays CGM (Continuous Glucose Monitor) data. Supports Dexcom, Nightscout, LibreView, LibreLink, and Carelink (Medtronic) with automatic trend detection.
- Multi-sensor support — Dexcom, Nightscout, LibreView, LibreLink, Carelink (auto-detected)
- Displays: current glucose, delta from previous reading, trend direction, last update time, glucose prediction
- Color-coded glucose zones (AGP/TIR standard thresholds)
- Stale data indicator — card fades when data is older than 15 minutes
- Tap to open HA more-info dialog with history graph
- Automatic local time format and unit support (mmol/L and mg/dL)
- Responsive card sizing
- Visual configuration editor
| Integration | Value Entity | Trend Detection |
|---|---|---|
| Dexcom | sensor.*_glucose_value |
Auto-detected from *_glucose_trend entity |
| Nightscout | sensor.blood_glucose |
Auto-detected from direction attribute |
| LibreView (PTST) | sensor.*_glucose_level |
Auto-detected from trend attribute |
| LibreLink (gillesvs) | sensor.*_glucose_measurement |
Auto-detected from sibling *_trend entity |
| Carelink (Medtronic) | sensor.*_last_sg_mgdl |
Auto-detected from *_last_sg_trend entity |
Just select your glucose sensor — the card figures out the rest automatically.
- Home Assistant with HACS (Home Assistant Community Store) installed
- A CGM integration set up (Dexcom, Nightscout, or LibreView)
- Open HACS in Home Assistant
- Navigate to "Frontend" section
- Click the "+" button
- Search for "SugarTV Card"
- Click "Install"
- Restart Home Assistant
- Add a new card to your dashboard
- Choose "Custom: SugarTV Card"
- Use the visual editor to configure:
- Select glucose value sensor
- Toggle prediction display
- Toggle color-coded glucose zones
- Customize glucose thresholds
# Minimal — just one entity, trend auto-detected
type: custom:sugartv-card
glucose_value: sensor.dexcom_glucose_value# Full config with all options
type: custom:sugartv-card
glucose_value: sensor.dexcom_glucose_value
glucose_trend: sensor.dexcom_glucose_trend # optional override
show_prediction: true
color_thresholds: true
thresholds:
urgent_low: 54 # mg/dL (or 3.0 mmol/L)
low: 70 # mg/dL (or 3.9 mmol/L)
high: 180 # mg/dL (or 10.0 mmol/L)
urgent_high: 250 # mg/dL (or 13.9 mmol/L)Color-coded zones are enabled by default using the AGP/TIR international standard thresholds.
| Zone | mg/dL | mmol/L | Style |
|---|---|---|---|
| Urgent Low | < 54 | < 3.0 | Red background, white text |
| Low | 54 – 70 | 3.0 – 3.9 | Orange text |
| In Range | 70 – 180 | 3.9 – 10.0 | Normal |
| High | 180 – 250 | 10.0 – 13.9 | Orange text |
| Urgent High | > 250 | > 13.9 | Red background, white text |
To disable color coding, set color_thresholds: false or use the toggle in the visual editor.
Colors can be customized via CSS custom properties in your HA theme:
# In your HA theme
sugartv-urgent-bg: '#c62828'
sugartv-urgent-text: '#ffffff'
sugartv-warning-text: '#e65100'- Found a bug? Create an issue
- Have an idea? Suggest an improvement
- Like the project? Star it on GitHub!
This project is licensed under the MIT License. See the LICENSE file for details.


