Repository navigation
โจ New Features & ๐ Bug Fix
โจ New in this release
๐ Per-entity grouping (#401)
Until now group_by was card-wide, so a daily temperature line and monthly energy bars meant two cards. An entity can now carry its own group_by: the chart's time grid becomes the finest grouping in use, and every series grouped coarser than it is drawn as calendar cells on that grid:
group_by: date
entities:
- entity: sensor.heat_pump_energy
graph_type: bar
aggregate_func: change
group_by: month # monthly cells on the daily grid
y_axis: secondary
- entity: sensor.outside_temperature
aggregate_func: avgThe monthly bars span their calendar months (a window starting mid-month gets a partial first cell), the tooltip shows the day's values together with the containing month's total, and stacking never mixes grids. It works in both directions โ month on the card with date on one entity gives the same daily grid with monthly cells for the rest. Only raw/interval cannot be set per entity. Give a coarse series y_axis: secondary or independent when it dwarfs the others. Leave it unset and nothing changes. Editor: Entities โ entity โ Data โ Group By.
๐จ Custom CSS without card-mod (#415)
The class names from the CSS Styling wiki page can now be targeted from the card itself โ no card-mod install:
styles: |
.sgc-state-name { font-weight: 400; }
.sgc-state-value, .sgc-state-unit { font-weight: 500; }
ha-card { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }The sheet is applied inside the card, survives re-renders and visual-editor saves, and disappears when you clear it. Options you set on the card (background, border, padding, shadow, header colour) are inline, so a styles rule for the same property needs !important โ as with card-mod, which keeps working next to it. Editor: Card Settings โ Card Styling โ Custom CSS.
๐ Upper threshold for Ranking (#408)
Ranking could already drop the small values with ranking_min_value; ranking_max_value is its mirror and hides everything above a threshold. On a wall of battery sensors that leaves only the ones that need charging:
chart_mode: ranking
ranking_max_value: 20
entities:
- entity: sensor.remote_battery
- entity: sensor.door_sensor_battery
- entity: sensor.thermostat_batterySet both keys to keep a band. Like Min Value it compares against the absolute value. When nothing is left the card says why instead of drawing an empty chart โ below the threshold, above the threshold, or outside the threshold range (10โ20) when both keys are set. Editor: Chart Settings โ Chart โ Ranking โ Max Value, next to Min Value.
๐ Year period that starts in another month (#407)
A heating season, a school year or a fiscal year does not begin on 1 January. year_start_month moves the start of the Year period โ the date picker's Year view, its This Year / Last Year presets and graph_start: year:
show_date_picker: true
date_picker_default_mode: year
year_start_month: 7 # 1 Jul โ 30 JunThe header reads 2026/27, the arrows step by that period, show_full_period runs the axis to 30 June and compare: last_year lines up with it. Only the window moves: month buckets, tick labels and the Month / Week periods stay on the calendar. Unset or 1 = today's behaviour. Editor: Chart Settings โ Calendar โ Time Window โ Year Starts In.
๐ Show or hide an entity from a helper (#413)
Eighteen heating charts, one "hide the valve strips" toggle โ until now that meant two copies of every card swapped with card visibility. The per-entity enabled key now accepts an entity ID and follows it live:
entities:
- entity: sensor.bathroom_floor_temperature
- entity: binary_sensor.bathroom_pwm
graph_type: state_strip
enabled: "!input_boolean.dashboard_hide_valves"enabled: input_boolean.x shows the entity while the helper is on; "!input_boolean.x" (quoted โ a bare ! is a YAML tag) hides it while the helper is on. When the helper flips, the series, its legend entry, state-row item and tooltip rows disappear on every card pointing at that helper, in the same moment, with no reload and no new database query โ the entity is still loaded, which is what keeps the flip instant and the other entities' colours and legend state untouched. unknown, unavailable, a missing helper or a state that is not an on/off value leave the entity shown. Leave it unset and nothing changes; enabled: false remains the way to skip loading an entity entirely. Editor: Entities โ entity โ General โ Enabled Follows (the Enabled switch locks with a badge while a reference is set).
๐ท๏ธ Names above / left state strips and taller state rows (#417)
With several state_strip rows under one chart you had to match band colours to legend entries. state_strip_titles: true writes each strip's name on a small line directly above its band โ the same name the legend and tooltip use:
state_strip_titles: true
entities:
- entity: sensor.boiler_temperature
- entity: switch.boiler_fan
name: Fan
graph_type: state_strip
- entity: binary_sensor.burner
name: Burner
graph_type: state_stripstate_strip_title_font_size (default 10) sets the size; long names get an ellipsis, titles are dropped automatically when the card is too short for them, and name: "" leaves one strip untitled. Prefer no extra height? state_strip_title_position: left writes the name in the Y-axis column beside the band instead โ the layout stays exactly as it is, the name is cut to the column width, so keep left names short. Leave it all unset and nothing changes. Editor: Chart Settings โ Chart โ Visual Options โ Strip Titles / Title Size / Title Position โ and the strip options that were YAML-only until now, Strip Height and Show State Labels, sit in the same rows.
โ ๏ธ Behaviour changes
- The legend's Avg now follows the entity's
decimalslike Min, Max, Last and Sum. Cards that never setdecimalswill show Avg with one decimal (the default) instead of two โdecimals: 2on the entity restores the old look (#406) - A butterfly chart with one upright and one inverted series is square at the zero line. Both bars used to keep all four corners; they now read as one bar passing through zero, like every other stacked pair (#403)
- Hour ticks sit on whole hours of the chart's time zone. When the card's
time_zoneis offset from your device by a fraction of an hour (Kolkata, Chatham, Lord Howe), ticks move from xx:30 to xx:00 and those charts get date labels at midnight for the first time (#414)
๐ Fixes & reliability
- ๐๏ธ X-axis day labels disappear after a daylight-saving change (#414)
- ๐ข
legend_stats: avgdoes not respect the selecteddecimalsvalue (#406) - ๐งฑ Bar radius with an inverted series in a stacked chart (#403)
- ๐ฑ๏ธ Tooltips not working on stacked items prior to the 12-month period โ on month-bucketed bar charts the tooltip could not move left of the first bar of the entity listed last, so a sensor with a shorter history froze the tooltip for every other entity (#416)
- ๐ฌ Tooltips in the visual editor are cut off at the edge โ the help box now stays inside the editor left and right, and on the first row it opens downward instead of disappearing under the dialog header (#404)
- ฮฃ
aggregate_func: sumon a sensor without sum statistics drew nothing and left the legend empty โ the legend now says why, and the editor's Aggregation help explains which sensorssumneeds (#410)
Release v4.04 (For those who are not updated to v4.04 yet)
โจ New in this release
๐ Bounds that follow a helper (#383)
lower_bound and upper_bound no longer have to be fixed numbers โ point them at an entity and the axis follows it live. Move an input_number slider, or pick another option in an input_select, and every chart pointed at that helper rescales straight away, without a reload.
type: custom:statistics-graph-chart-card
lower_bound: input_number.chart_floor
upper_bound: input_select.chart_ceiling
entities:
- entity: sensor.outside_temperatureAll six bound options take a helper this way: lower_bound, upper_bound, their _secondary twins, and min_bound_range / min_bound_range_secondary. On the four edge bounds the soft form still applies, so "~input_number.chart_floor" lets the axis grow past the helper's value when the data needs more room.
If the helper's value is not a number โ an auto option in your input_select, or a helper that is unavailable โ that edge simply hands itself back to auto-scale. So a single input_select with auto / 0 / 10 / 20 gives you a dropdown that switches the axis between automatic and fixed.
Editor: Chart Settings โ Y Axis โ Lower Bound / Upper Bound / Min Bound Range. All six fields are free text now, so an entity ID can be typed straight in; a plain number is still saved as a number.
๐ Last 2, 3 and 5 years in the date picker (#384)
The date picker's rolling periods now reach beyond a year. last_2y, last_3y and last_5y join last_12m everywhere the shorter periods already worked โ the picker bar (as 2Y, 3Y, 5Y), the calendar popup's quick-range list, and date_picker_default_mode.
show_date_picker: true
date_picker_modes: [day, week, month, last_12m, last_2y, last_5y]
date_picker_default_mode: last_2yThe arrows step by a whole period, so one click back from Last 2 years moves two years further back. Pair them with auto_scale_points and the card buckets by month on its own, which keeps a five-year view fast.
Editor: Chart Settings โ Calendar โ Visible Modes (new 2Y / 3Y / 5Y chips) and Default Mode.
๐ Zoom buttons on the chart (#396)
Turn on show_zoom_buttons and the chart gets zoom in, zoom out and reset in its top-right corner. Each press changes the zoom by 2ร.
show_zoom_buttons: trueThe reset button only appears once you are actually zoomed or drilled in, and one press clears both at once. The real win is on phones: the buttons work even with drag-zoom switched off, so a chart you could previously only zoom by dragging a selection โ or by remembering the double-tap โ is now reachable with a tap. They follow zoom_sync groups like every other zoom action, and step aside for the export button when you have both.
Editor: Chart Settings โ Overlay โ Zoom Buttons, directly under Drill Down.
โฑ๏ธ Value Transform knows the time (#390)
Alongside x, avg and the rest, a value_transform expression now also gets t (this point's time), now (the current time), hour (hour of day as a decimal, 0โ23.99, in the card's display timezone โ 17:30 is 17.5) and weekday (1 = Monday โฆ 7 = Sunday).
entities:
# hide a forecast's past, keep only what is still ahead
- entity: sensor.solar_forecast
value_transform: "return t <= now ? null : x;"
# a cap that changes during the evening peak
- entity: sensor.price_limit
value_transform: "return (hour >= 17 && hour < 21) ? 8 : 12;"A transform that returns null now leaves a visible gap rather than quietly dropping the point โ see Behaviour changes below.
Editor: per-entity โ Advanced โ Value Transform โ the field's help text lists the new variables.
โฒ๏ธ default_interval for the interval picker (#392)
The interval picker remembers whatever you pressed last. default_interval lets you say where it should open instead:
show_interval_picker: true
interval_options: ["1H", "12H", "24H", "7D"]
default_interval: "24H"Leave it unset and the card keeps remembering your last pick, as before.
Editor: Chart Settings โ Overlay โ Default Interval, directly under the Visible Intervals grid (Auto keeps the remembered behaviour).
๐จ axis_style: native now covers the legend (#393)
axis_style: native already matched Home Assistant's own charts on the axes and grid. It now reaches the per-entity legend too: entity names and their stat values take the theme's main text colour at full strength instead of the dimmer secondary one, and the stat values grow from 11 px to the same 12 px as the axis labels. The compact legend was already themed and is unchanged.
Editor: Card Settings โ Card Styling โ Axis Style.
โ ๏ธ Behaviour changes
Two changes are visible on existing cards after the update:
- A
value_transformthat returnsnullnow breaks the line at that point instead of connecting across the hole. Tooltips, moving averages and the range band follow the same holes, and a point left on its own gets a dot so it is not invisible. If you already use a transform to hide points, expect a gap where the line used to join (#390) axis_style: nativelegends look brighter, and their stat values slightly larger. There is no legend-only switch โ the way back isaxis_style: subtle, which also returns the axes and grid to the card's own look (#393)
๐ Fixes & reliability
- ๐ A card left open no longer freezes when the browser's "visible again" signal is late or missing (#387)
- ๐ Short date-picker views read recorder history again, so spikes keep their height (#385)
- ๐งฎ Statistics totals stop drifting upward on a dashboard left open (#389)
- ๐
height: autosizes to the card again in a sections view (#388) - ๐ช Step graphs stay stepped with Color Threshold Direction set to Horizontal (#395)
- โ๏ธ The visual editor no longer resets a custom
datetime_formattyped in YAML (#398) - ๐ A custom date format now sizes the X-axis labels from the pattern itself (#398)
- ๐ The tooltip time follows the cursor whatever order the entities are in (#377)
- ๐ฏ Gauge: a sub-pixel minโmax range no longer paints a stray tick on the far side of the dial (#400)
- ๐๏ธ A state strip shows the state already in force at the start of the window (#359)
- ๐๏ธ Each card remembers its own interval instead of borrowing another card's (#392)
- ๐ An Hours To Show that matches no interval button now gets a button of its own (#392)
- ๐งฉ The date, points-per-hour and group-by pickers each remember their own card too
- ใฐ๏ธ Smoothing survives per-segment colouring โ Rise/Fall colours, Horizontal thresholds and the raw threshold source
- ๐ฏ๏ธ Candlestick wicks survive a Value Transform
- ๐๏ธ A rolling window measured in months no longer slips into the next month when the target month is shorter
- ๐ The calendar popup's quick ranges reach 2, 3 and 5 years
- ๐งญ A date-picker period left in the browser by a newer or differently configured card is validated on load
- ๐ A card following a
date_picker_groupignores a period it does not recognise, instead of taking over the picker - ๐ฏ A picker period you removed from the visible modes is no longer silently selected
- ๐๏ธ The order you give
date_picker_modesin YAML survives a visual-editor save - ๐งน The visual editor no longer writes an empty
annotations: []into your YAML