The first major release in two years. It collects everything from the five release candidates (rc.1 to rc.5). Thanks to everyone who contributed and tested!
Special thanks
A special thank you to @rosenrot00 and @dewi-ny-je (Olaf Marzocchi). Between them they wrote 45 of the PRs in this release, and they also reviewed PRs, answered questions and kept the issues in order. This release would not exist without them.
Breaking changes
Check these before you update:
- Plotly.js 2.34 → 4.1.2. Plotly removed some old options, for example plain-string
titles,transforms,hsv()colors and Mapbox traces. See Plotly.js 4 compatibility (#631). - Entity
filtersreplacedefaults.entity.filters, instead of being merged with them. Usefilters: []to turn the defaults off for one entity (#656). - Some filters give different (correct) results:
integrate(first interval,reset_every),median,sliding_window_moving_average, andresampleat exact sample times (#651, #411). - Dates follow Home Assistant's time zone setting (your profile's "local" or "server"), or the new
time_zone:option. Give times as dates (new Date()), not numbers (Date.now()). Inon_clickand hover, x values are date strings in that time zone (#659). - Calendar periods:
resample: 1dandintegratewithreset_every: 1dstart at midnight, also on 23- and 25-hour days. Weeks start on Home Assistant's first weekday, months on the 1st, years on January 1st. Use24hfor fixed 24-hour steps (#659, #670, #707). - History lines stay drawn until a state becomes unavailable, instead of leaving a gap when nothing changed. Click events count the extra drawn points, see
on_clickin the readme (#665). - Trace names follow Home Assistant's naming, and
name:accepts Home Assistant's list form, for examplename: [{type: area}, {type: entity}](HA 2026.4 or newer) (#646). - Bar graphs use
color_scheme, so bar colors change if you set a custom scheme (#664). - The default font matches Home Assistant (#657).
disable_pinch_to_zoomis deprecated. It still works and is the same asextended_touch_support: false(#673).
New features
- Touch gestures: pinch to zoom and pan like a map. Press and hold, then slide, to see the values under your finger. Double tap, then drag, to zoom or pan. Configure them with
extended_touch_support(#673, #678, #687). - All Plotly chart types, including
scattergl,splom,parcoords, maps (scattermap,choroplethmap,densitymap) andquiver(#632, #677). - Presets, and
defaults.xaxes(#526). - New filters:
min_max(cuts dense data down to the highs and lows, with full detail when you zoom in),align_timestamps(combines stored series by timestamp), andresamplewithinterpolate: true(#710, #694, #709, #411). - New options:
show_extrema: truelabels the minimum and maximum of a trace.align_zero: trueputs zero at the same height on overlaid Y axes (#696, #700). - Statistics:
period: year(#702). on_clickon annotations andupdatemenusbuttons (#525).- Filters can be async, and filter lists can be generated with
$ex/$fn(#597, #662). - Home Assistant theme colors in
css_vars, for examplecss_vars['blue-color'](#653). - The visual editor's Y-axis bounds, log scale and "fit Y data" now work (#661).
Faster and more reliable
- Plotly and chart types load on demand. Dashboards without plotly cards load about 10× faster, and charts with only line or bar traces about 3× faster (#677, #711).
- Fewer requests: history and statistics requests are batched, shared between cards, and fetch only the fields needed (#630, #638, #689, #690).
- Statistics refresh when Home Assistant publishes new data, not on every state change (#667).
- Live updates no longer miss or stall on fast changes. Cards out of view update every 30 s and catch up once visible (#682, #695).
- Smoother loading: a stable loading state, no white flash, fewer redundant renders, limited cache growth, and no crash on very long histories (#634, #635, #637, #639, #654, #660).
- Fixes: a pan made while data loads is kept (#683). The right margin for a second Y axis no longer depends on YAML order (#698). Trendlines keep numeric X values (#701). Templates can read default names and units anywhere (#697). No duplicate hover for
show_value(#626).
What's Changed
- Update readme.md function gotchas by @ando2040 in #485
- Add support for annotation and button click by @dcbr in #525
- Add presets and xaxes defaults by @dcbr in #526
- Fix readme formatting of preset examples by @dcbr in #527
- Update readme.md by @JensAtHome in #617
- Allow filter functions to be async by @b3nn0 in #597
- Update workflows by @dewi-ny-je in #648
- Update Plotly.js to 4.1.1 by @rosenrot00 in #631
- readme.md: Add HACS button by @reedy in #568
- Fixes duplicate hover info for
show_valueby @tbaron in #626 - Add modern Plotly trace types by @rosenrot00 in #632
- Generate YAML editor schema from Plotly metadata by @rosenrot00 in #633
- add interpolating resample filter by @felixmxr in #411
- Avoid empty initial Plotly render by @rosenrot00 in #637
- Batch compatible statistics requests by @rosenrot00 in #630
- Match default graph font to Home Assistant typography by @dewi-ny-je in #657
- Map function-typed config fields to $fn/$ex strings in the schema by @dewi-ny-je in #655
- Entity filters replace default filters by @dewi-ny-je in #656
- Limit cache growth for rolling time ranges by @rosenrot00 in #634
- Skip cancelled render waits by @rosenrot00 in #654
- Fix: old tests out of sync with the code by @dewi-ny-je in #651
- Skip redundant resize renders by @rosenrot00 in #635
- Batch history requests over WebSocket by @rosenrot00 in #638
- Expose Home Assistant theme colors in css_vars by @rosenrot00 in #653
- Show a stable loading state before the first render by @rosenrot00 in #639
- Avoid argument limits when merging large histories by @rosenrot00 in #660
- Respect y-axis limits from the visual editor by @rosenrot00 in #661
- Upgrade date-fns to v4 by @dewi-ny-je in #672
- Map-style touch gestures and hold to scan by @tannerln7 and @dbuezas in #673
- Fix shifted history endpoints when browsing by @rosenrot00 in #663
- Apply color schemes to bar graphs by @rosenrot00 in #664
- Remove redundant layout deprecation link by @rosenrot00 in #668
- Support $ex/$fn for entity filters by @rosenrot00 in #662
- Document min/max statistics bands by @rosenrot00 in #671
- Preserve unchanged history lines until a state becomes unavailable by @rosenrot00 in #665
- Fix autoranging for custom filter data by @rosenrot00 in #669
- Refresh statistics when Home Assistant publishes new data by @rosenrot00 in #667
- Avoid full cache merges for new single samples by @rosenrot00 in #675
- Keep a pan made while the data loads by @dbuezas in #683
- Pan with left/right in double-tap-drag by @dbuezas in #678
- Faster live updates and renders by @dbuezas in #682
- Wait for the off-screen state in the resize test by @dbuezas in #688
- Keep touch zoom working with scrollZoom: false by @dbuezas in #687
- Update dependencies and tooling by @dbuezas in #676
- Load Plotly and chart types on demand by @dbuezas in #677
- Draw dates in Home Assistant's timezone by @dewi-ny-je in #659
- Trim the statistics refresh tests by @dbuezas in #692
- Read the visible range in one function by @dbuezas in #693
- Resolve default trace names via hass.formatEntityName by @bramkragten in #646
- Modern tooling: Rolldown, Vitest, TypeScript 7, oxlint by @dbuezas in #680
- Use bun instead of npm by @dbuezas in #684
- Use oxfmt instead of Prettier by @dbuezas in #681
- Format all files with oxfmt by @dbuezas in #703
- Calculate the automatic right margin after parsing entities by @rosenrot00 in #698
- Fetch only required statistics fields by @rosenrot00 in #689
- Document linked hover for stacked subplots by @rosenrot00 in #699
- Keep live history complete by @rosenrot00 in #695
- Show minimum and maximum values on traces by @rosenrot00 in #696
- Align stored series by timestamp by @rosenrot00 in #694
- Align calendar resampling and integration resets by @rosenrot00 in #670
- Resolve internal defaults on demand by @rosenrot00 in #697
- Share history and statistics requests between cards by @rosenrot00 in #690
- Support yearly statistics periods by @rosenrot00 in #702
- Preserve numeric X coordinates in trendlines by @rosenrot00 in #701
- Test the time zone round trip on DST change days only by @dbuezas in #704
- Refuse to install with npm, pnpm or yarn by @dbuezas in #705
- Accept overlaying: false in the YAML editor schema by @dewi-ny-je in #708
- Add optional zero alignment for overlaid Y axes by @rosenrot00 in #700
- Reset integrate on January 1st for whole-year reset_every by @dewi-ny-je in #707
- Bugfix/align timestamps edge cases by @dewi-ny-je in #709
- Add adaptive min/max downsampling by @rosenrot00 in #710
- Download all startup files of the card at once by @dbuezas in #711
New Contributors
- @ando2040 made their first contribution in #485
- @dcbr made their first contribution in #525
- @JensAtHome made their first contribution in #617
- @b3nn0 made their first contribution in #597
- @dewi-ny-je made their first contribution in #648
- @rosenrot00 made their first contribution in #631
- @reedy made their first contribution in #568
- @tbaron made their first contribution in #626
- @felixmxr made their first contribution in #411
- @tannerln7 made their first contribution in #673
- @bramkragten made their first contribution in #646
Full Changelog: v3.3.5...v4.0.0