πππ New Chart Type & Moving Averages & Some Improvements
πππ
# π―οΈ Candlestick (OHLC) charts
Any entity can now be drawn as trading-style candlesticks β just set its graph type to Candlestick in the editor (or graph_type: candlestick in YAML). Perfect for prices, power, or any value where you care about the range within each time period, not just a single line.
Each candle summarizes one time slice:
- Body β from the period's opening value to its closing value
- Wick β the thin line reaching up to the high and down to the low
- Green / red β green when the value finished higher than it started, red when it finished lower
Hover any candle to see its Open, High, Low, and Close in the tooltip.
Tip: each candle covers one data bucket. Use Points/Hour (for recent history) or Group By β Date / Week / Month (for long-range data) to decide how much time each candle represents. Fewer, wider candles show clearer wicks.
γ½οΈ Moving averages (trend lines)
Overlay one or more simple moving-average (SMA) lines on any entity β a smoothed trend that averages the last N buckets. Add as many as you like, each with its own period, color, and width, straight from the editor (per-entity β Appearance β Moving Averages) or in YAML:
entities:
- entity: sensor.keenetic_router_cpu_load
graph_type: bar
moving_averages:
- period: 7 # short MA β averages the last 7 buckets
color: "#ffffff"
- period: 26 # long MA β averages the last 26 buckets
color: "#f1c40f"Great for separating signal from noise on busy sensors (CPU, power, prices) or for classic short/long crossover views like MA7 vs MA26.
- The period is in buckets, not hours. The bucket size comes from Points/Hour (interval mode) or Group By (
hour/date/weekβ¦). Withgroup_by: hour,period: 26is a 26-hour average; with one bucket every 5 minutes, it covers ~130 minutes. - Long averages draw even on short windows. A 26-bucket average normally needs 26 buckets of history before it can start. The card now looks back beyond the visible window automatically by exactly what the longest average needs β so MA26 draws fully across a 24-hour view without widening Hours to Show or scrolling. The visible chart, axis, and statistics stay exactly the same; only the average lines use the extra look-back.
- Candlestick-aware. Over candlesticks, each average uses the candle close, just like on a trading chart.
- Each line is drawn on the entity's own Y axis, so it sits right on top of the bars / line / candles it summarizes.
Tip: if a very long period still looks short on a narrow window, it simply means that much history isn't recorded yet β the card pulls back as far as the data goes.
πBars and candles now line up with the clock
Interval bars and candlesticks now snap to clean clock boundaries (like :00 / :15 / :30) and sit centered on the matching X-axis tick. As time moves forward, they stay put instead of slowly drifting across the chart β so the columns always match the time labels underneath them.
πA cleaner Points/Hour picker
In the editor, Points/Hour is now a simple dropdown of the most useful values (1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60) that divide an hour evenly. This is purely a convenience in the UI β if you prefer a custom number, you can still type any value directly in YAML and it will be respected.
β οΈ Heads-up
Secondary (right) Y axis is now hidden by default
The second Y axis (the right-hand labels, used when an entity is set to the secondary axis) is now off by default. Your secondary entities are still plotted exactly as before β only the right-side number labels are hidden unless you turn them on.
If you want those right-side labels back, just enable Y2-Axis under General Settings β Y Axis β Visibility (or set show_y2_axis: true). Cards that already had this turned on are unaffected.