Card guide Home Assistant custom cards
Mini Graph Card for Home Assistant
A small graph card for sensor history: a line or bars, several sensors on one graph, colours that change at values you set, and the minimum, maximum and average.
What it is
Mini Graph Card reads a sensor's history from Home Assistant's recorder and draws it as a line or bars under the current value. It's one card, and everything below is custom:mini-graph-card with a few options changed.
hours_to_show sets how far back the graph goes, 24 hours unless you change it. points_per_hour sets how many buckets each hour is split into, and so how smooth the line is. Each bucket shows the average by default, and you can switch it to the median, minimum, maximum, sum or the change across the bucket.
Our shots draw five minutes of fast-changing demo sensors. The YAML below is set for a real sensor instead: 24 hours with points_per_hour: 4, one point every 15 minutes, and one bar per hour on the bar chart.
It installs through HACS.
What it gives you
Shot on Home Assistant 2026.10.1. Stock is Home Assistant with no theme installed; a theme changes how these look, not what they do.
Line graph
custom:mini-graph-card One sensor's history as a filled line under its current value.
Show the YAML
type: custom:mini-graph-card
hours_to_show: 24
points_per_hour: 4
grid_options:
columns: 12
entities:
- sensor.speedtest_download
name: Download Multiple entities
custom:mini-graph-card Two sensors on one graph, each in its own colour, with a legend.
Show the YAML
type: custom:mini-graph-card
hours_to_show: 24
points_per_hour: 4
grid_options:
columns: 12
name: Network
entities:
- entity: sensor.network_in
name: In
- entity: sensor.network_out
name: Out
show:
legend: true Bar chart
custom:mini-graph-card The same history as bars. Each bar is one time bucket, set by points_per_hour.
Show the YAML
type: custom:mini-graph-card
hours_to_show: 24
points_per_hour: 1
grid_options:
columns: 12
entities:
- sensor.router_load
name: Router load
show:
graph: bar Colour thresholds
custom:mini-graph-card The line changes colour at the values you set, here green under 10 ms of ping, orange to 13 and red above.
Show the YAML
type: custom:mini-graph-card
hours_to_show: 24
points_per_hour: 4
grid_options:
columns: 12
entities:
- sensor.speedtest_ping
name: Ping
color_thresholds:
- value: 0
color: '#4caf50'
- value: 10
color: '#ff9800'
- value: 13
color: '#f44336'
color_thresholds_transition: hard Graph only
custom:mini-graph-card The name, icon and value are hidden, leaving just the line to sit inside another card or a stack.
Show the YAML
type: custom:mini-graph-card
hours_to_show: 24
points_per_hour: 4
grid_options:
columns: 12
entities:
- sensor.router_temperature
show:
name: false
icon: false
state: false
line_width: 3 Min, max and average
custom:mini-graph-card The lowest and highest values in the window, with when they happened, and the average between them.
Show the YAML
type: custom:mini-graph-card
hours_to_show: 24
points_per_hour: 4
grid_options:
columns: 12
entities:
- sensor.speedtest_upload
name: Upload
show:
extrema: true
average: true The repository
- Author
- kalkih @kalkih
- Latest release
- v0.13.0 29 May 2025
- GitHub stars
- 3.9k
- Install via
- HACS Free, MIT
Maintenance: No stable release since 0.13.0 in May 2025. Version 0.14 has been in beta since June 2026 and is still being worked on, with the third beta out in early October. We shot the stable 0.13.0.
Built in instead: Home Assistant's Sensor card draws a line under the value, and the History graph and Statistics graph cards plot several sensors over time, all with nothing to install. None of them colours the line at set values or writes the min, max and average on the card.
Frequently asked questions
Why is my graph a flat line?
The card only draws what the recorder holds. A sensor that hasn't changed in the window draws flat, and a sensor excluded from the recorder draws nothing. Check its history page first.
Can it show a week of data?
Yes. Set hours_to_show: 168 and lower points_per_hour so each point covers a few hours. group_by: date gives one point per day.
Can it graph a sensor that isn't a number?
Yes, with state_map, which turns states such as on and off into values the graph can draw.
Should I install the 0.14 beta?
Only if you need something it fixes. HACS installs the stable 0.13.0 unless you ask it for a beta, and that's what these shots use.
Still need a hand?
We answer most messages within one business day. If your question is about an existing order, have your order number ready. It speeds things up.
Contact us