feat: new dashboard that shows available temperatures historical - #5457
feat: new dashboard that shows available temperatures historical#5457slayer01 wants to merge 1 commit into
Conversation
✅ Deploy Preview for teslamate ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
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. :-) |
|
Seems to be hardcoded to celsius only? |
There was a problem hiding this comment.
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_unitfromsettings.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 (tagtesla) car_idas 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:
- At a glance — last inside/outside + outside min/max (stats only; see §5)
- Hero — inside & outside over time; optional driver setpoint while
is_climate_on - Daily ambient envelope — candlestick (§3)
- 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_binonly 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. TodayspanNulls: truedraws 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).
Add a Grafana dashboard with a historical overview of all temperatures logged by TeslaMate: