Skip to content

πŸš€πŸš€πŸš€ New Features & ⬆️ Improvements & πŸ› Bug fixes

Choose a tag to compare

@cataseven cataseven released this 15 Jul 21:19
3cb218e

✨ Period Comparison

image image

No more duplicating an entity and juggling offset by hand. One option overlays any series with a faded, dashed "ghost" of its previous period:

entities:
  - entity: sensor.energy_consumption
    compare: previous_period
  • Periods: previous_period, yesterday, last_week, last_month, last_year, or a custom number of hours.
  • Smart shifting: previous_period follows whatever window you are looking at. In the date picker's month view, July is compared with June aligned by calendar date β€” not by a fixed number of hours. Month-end dates are handled correctly (Mar 31 compares against Feb 28/29).
  • Tooltip Ξ”%: hovering shows the current value, the previous-period value, and the change in percent β€” green for up, red for down. The previous-period row also shows its own date and time (e.g. hovering 15 Jul, 14:00 shows 14 Jul, 14:00 above the comparison value), so you always know exactly which moment you are comparing against.
  • One click, both series: hiding a series from the legend hides its ghost too.
  • Fully styleable when you want more control:
entities:
  - entity: sensor.energy_consumption
    compare:
      period: last_week
      color: "#888888"      # default: faded main color
      opacity: 0.6          # default 0.45
      line_style: dotted    # default dashed
      show_fill: false
      show_delta: true      # Ξ”% in the tooltip
      show_in_legend: true

Everything is also configurable from the visual editor: each entity now has a Period Comparison section (timeline charts).

✨ PNG & CSV export

export

Turn it on and a small download icon appears in the top-right corner of the card:

show_export: true
  • Download PNG (Chart) β€” a crisp 2Γ— image of the plot exactly as displayed (works for all chart modes, dark themes included).
  • Download PNG (Card) β€” the whole card in one image: header, chart, state row and legend included. (If your theme uses an external background image the capture falls back to the chart-only export.)
  • Download CSV β€” the visible series' plotted data in a spreadsheet-friendly wide format (UTF-8 with BOM, ISO timestamps in UTC). If you are zoomed in, both PNG and CSV export the zoomed range β€” you export what you see.
  • Files are named after your card header, e.g. Energy_Overview-20260715-1630.png.
  • Notes: candlestick CSV exports the bucket value (not OHLC); state-mapped series export their numeric values; the option is templatable like the other display toggles.

✨ Price Entity β€” consumption Γ— tariff, done right

Chart what your energy actually costs, even on dynamic tariffs (Nordpool, Tibber, EPEX…):

price
entities:
  - entity: sensor.energy_meter
    aggregate_func: change
    price_entity: sensor.electricity_price
    unit: "€"
  • Every slice of consumption is billed at the price valid at that moment β€” Ξ£(kWhα΅’ Γ— priceα΅’) β€” not "average price Γ— total kWh". With a day of 10 kWh cheap + 5 kWh peak power, the difference is real money.
  • The price history is fetched automatically alongside your data (long windows use its long-term statistics), and prices are read as a step function β€” exactly how tariffs behave.
  • price_attribute reads the price from an attribute instead of the state. Tariff changes refresh the card automatically. Period comparison works too: the ghost is billed at its period's prices.
  • Configure in the editor: Price Entity / Price Attribute under each entity's Advanced β†’ Advanced Calculations section.

✨ Every chart speaks your language now

The remaining hardcoded English labels are gone: tooltip rows in Gauge (Peak/Low), RadialBar (Range/Progress), Radar (Range/Level), Pie/Ranking/Histogram (Share/Range/Count), the candlestick Change/Altitude rows, Scatter's empty-state message and the unknown-chart-mode notice are all translated into the card's 16 languages. Calendar weekday names and box-plot month names now come from your locale automatically.

A second sweep caught the stragglers: the Loading… placeholder, the radar "needs 3 entities" notice, the State option in the attribute dropdown, the date-picker navigation labels read by screen readers, and in the editor the annotation type names (Event marker, Time span, H-line, H-band), the icon-picker labels, the "Disabled when thresholds/trend active" notes and the remaining input placeholders (Off, All, current year, (all together)) β€” all translated now.

And the big one: all 226 β“˜ help tooltips in the visual editor are now translated into the card's 15 non-English languages. Hover any info icon and read the explanation in your own language β€” missing entries gracefully fall back to English. (This grows translations.js to ~1.6 MB; it is loaded once and cached by the browser.)

✨ Weeks start on your day

Weekly grouping, the date picker's week view and calendar grid, weekly x-axis ticks and box-plot weekly buckets now follow Home Assistant's First day of the week setting from your user profile. With the default ("Automatic"), the day comes from your language β€” US users get Sunday-based weeks, most of Europe keeps Monday. No configuration needed on the card.

✨ Templates for show/hide toggles

Display toggles now accept Jinja templates directly β€” same option, no extra _template keys. Drive card behavior from any helper or sensor:

show_legend: "{{ states('input_boolean.show_legend') == 'on' }}"
entities:
  - entity: sensor.power
    show_state: "{{ states('input_boolean.show_state') == 'on' }}"
    show_graph: "{{ is_state('binary_sensor.presence', 'on') }}"
  • Works on 15 card-level toggles (show_legend, show_grid, show_tooltip, show_tooltip_total, tooltip_stacked_total, show_now_line, show_x_axis, show_y_axis, show_y2_axis, show_x_ticks, show_y_ticks, show_y_axis_label, stacked, period_highlight, logarithmic, state_timeline_show_labels) and 18 entity-level toggles (show_state, show_in_legend, show_graph, show_line, show_fill, show_points, smooth, gradient, show_data_labels, show_average, show_trend_icon, show_color_dot, show_timestamp, show_range_values, show_extrema_min, show_extrema_max, extrema_show_timestamp, state_adaptive_color).
  • Live: the card reacts immediately when the template's result changes β€” no reload needed.
  • Editor-safe: a toggle managed by a template shows locked in the visual editor with a {…} badge (hover to see the template). Editing other options never overwrites your template.
  • Data-source and sync options (e.g. cache, tooltip_sync, show_range_band) intentionally stay non-templatable β€” they control fetching and cross-card wiring, not display.

✨ State Timeline: hide the labels inside segments

A new toggle removes the state names (e.g. "Clear") drawn inside timeline segments for a clean color-band look:

chart_mode: state_timeline
state_timeline_show_labels: false   # default true

Available in the editor next to Corner Radius, and it accepts a template too.

✨ "Raw (no grouping)" in the visual editor

group_by: raw draws every recorded sample at its exact timestamp β€” perfect for binary sensors as step charts, where each on/off transition matters. It is now selectable in the editor's Group By dropdown whenever one of your entities uses graph_type: step (and it always stays visible if your config already uses it).

✨ Pinch zoom & zoom history (mobile-friendly zooming)

Zooming finally feels right on phones and tablets:

  • Pinch to zoom β€” put two fingers on a timeline chart and pinch: the chart zooms around the point between your fingers, live. Opening all the way back out returns to the full view.
  • Zoom history β€” every zoom (brush or pinch) is remembered, up to 20 levels. Double-tap (touch) or double-click (mouse) steps back one level; when there is nothing left to step back to, you land on the full window.
  • The long-press-and-drag brush still works exactly as before, and pinch cooperates with cross-card zoom_sync.

Small behavior change: double-click used to reset the zoom completely β€” it now steps back one level at a time. If you only zoomed once, nothing changes.