Skip to content

feat: new dashboard that shows available temperatures historical - #5457

Draft
slayer01 wants to merge 1 commit into
teslamate-org:mainfrom
slayer01:slayer01/temperatures-dashboard
Draft

feat: new dashboard that shows available temperatures historical#5457
slayer01 wants to merge 1 commit into
teslamate-org:mainfrom
slayer01:slayer01/temperatures-dashboard

Conversation

@slayer01

@slayer01 slayer01 commented Jul 1, 2026

Copy link
Copy Markdown

Add a Grafana dashboard with a historical overview of all temperatures logged by TeslaMate:

  • Inside & outside temperature time series
  • Stat tiles for current values and min/max over the selected range
  • Climate setpoints (driver/passenger) while climate control is on
  • Outside temperature during charging
  • Heatmap of the outside-temperature frequency distribution

@netlify

netlify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deploy Preview for teslamate ready!

Name Link
🔨 Latest commit 274e6ff
🔍 Latest deploy log https://app.netlify.com/projects/teslamate/deploys/6a44efbb679cdf00081704d8
😎 Deploy Preview https://deploy-preview-5457--teslamate.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@CLAassistant

CLAassistant commented Jul 1, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@slayer01 slayer01 changed the title new dashboard that shows available temperatures historical feat: new dashboard that shows available temperatures historical Jul 1, 2026
@JakobLichterfeld JakobLichterfeld added the area:dashboard Related to a Grafana dashboard label Jul 1, 2026
@JakobLichterfeld

Copy link
Copy Markdown
Member

Thank you for your contribution, Daniel. And congratulations on creating your first ever PR on GitHub!

From a user`s perspective, I can see the benefit of this dashboard. As a maintainer, I love that you have already added a screenshot and the relevant link in readme.

May I ask you to review the dashboard, @swiffer? I can't see anything related to performance, but I'd be happy to be proved wrong and see your magic there as well. :-)

@JakobLichterfeld JakobLichterfeld added this to the v4.1.0 milestone Jul 1, 2026
@JakobLichterfeld JakobLichterfeld added the kind:idea Idea for new feature or some form of enhancement label Jul 1, 2026
@sdwalker

sdwalker commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Seems to be hardcoded to celsius only?

@swiffer swiffer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution — a multi-day temperature history is a real gap in the default set (Overview is “now”, Drive Details is per-drive). Screenshot + docs update are appreciated.

A few change requests before we can merge:

1. Units (temp_unit / convert_celsius)

All panels hardcode Grafana unit celsius, axis labels °C, and Celsius thresholds. Please follow the existing pattern (Overview, Efficiency, Projected Range, Drive Details, …):

  • Hidden template var temp_unit from settings.unit_of_temperature
  • Wrap values with convert_celsius(..., '$temp_unit')
  • Make field units / thresholds / axis labels unit-aware (°F must not keep 10/25/30/40 thresholds)

2. Dashboard shell (consistency)

Please align with other provisioned dashboards:

  • base_url (settings.base_url)
  • Header links: TeslaMate → ${base_url:raw} + Dashboards dropdown (tag tesla)
  • car_id as elsewhere

3. Drop / replace the “Distribution” heatmap

The heatmap counts raw positions samples. Logging is much denser while driving than when parked, so this is sampling-biased (same class of issue we handle carefully on Charge Level) and is easy to misread as “time at temperature.”

It also doesn’t answer a clear user question that the history + extremes don’t already cover.

Prefer: a daily outside-temp candlestick (or equivalent band):

Field Source
high max
low min
open p15 (e.g. percentile_cont(0.15))
close p85

Compute on time-debiased inputs (e.g. average into fixed bins first, then daily aggregates)—not raw row counts. Days with no samples can simply have no candle.

4. Structure from a user perspective

Suggested focus for this dashboard:

  1. At a glance — last inside/outside + outside min/max (stats only; see §5)
  2. Hero — inside & outside over time; optional driver setpoint while is_climate_on
  3. Daily ambient envelope — candlestick (§3)
  4. Optional secondary — outside while charging; keep light

Passenger setpoint is usually redundant with driver; one setpoint series is enough.

5. Stats and how to draw “mostly complete” history

Last-value stats: Prefer graphMode: none and a dedicated last reading (ORDER BY date DESC LIMIT 1), as on Overview. Avoid graphMode: area sparklines over long, sparse ranges — they look patchy and don’t add much next to the hero chart.

Main history timeseries: Aim for real data that still reads as continuous when the car was actually reporting:

  • Aggregate with $__timeGroup / date_bin only where samples exist (avg of temps in the bucket). Avoid filling every interval in the range with NULL — that turns a normal 30d view into a comb of tiny segments.
  • Set Connect null values → Threshold (not Always). e.g. connect gaps shorter than ~30–60 minutes (or ~1–2× $__interval), and break the line for longer sleeps/offline periods. Today spanNulls: true draws multi-day slopes through periods with no readings.
  • Prefer not carrying outdoor temp forward across long gaps (LOCF); a visible break is more honest than inventing overnight ambient.

That combination stays faithful to the log while keeping the chart readable for “mostly complete” awake/driving stretches.

6. Query reuse / cost

Several panels re-scan positions for overlapping stats (last, min/max, history, heatmap). Prefer one or few shared queries + transformations / shared query results for last, min/max, history, and daily aggregates—cheaper and less drift between panels. Avoid shipping every raw position row for long ranges (30d default).


Happy to re-review after a revision. Happy to help iterate on the daily candlestick or connect-threshold if useful.


🤖 Assisted by Grok 4.5 (xAI) via Grok Build (planning, review drafting).

@JakobLichterfeld
JakobLichterfeld marked this pull request as draft August 13, 2026 08:45
@JakobLichterfeld JakobLichterfeld modified the milestones: v4.1.0, v4.2.0 Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dashboard Related to a Grafana dashboard kind:idea Idea for new feature or some form of enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants