Loading...
Loading...
Creates and configures Home Assistant graph visualizations using history-graph, statistics-graph, mini-graph-card, and apexcharts-card with time ranges, aggregations, and multi-sensor support. Use when displaying sensor data over time, creating trend charts, comparing historical data, or building energy/climate/air quality dashboards.
npx skill4agent add dawiddutoit/custom-claude ha-graphs-visualizationtype: history-graph
entities:
- entity: sensor.temperature
name: Living Room
- entity: sensor.humidity
hours_to_show: 24span.endtype: custom:apexcharts-card
header:
show: true
title: 24 Hour History
show_states: true
graph_span: 24h
span:
end: hour # REQUIRED: minute/hour/day/week/month/year/isoWeek
yaxis:
- min: 0
max: 50
decimals: 1
apex_config:
chart:
height: 200
xaxis:
type: datetime
labels:
datetimeFormatter:
hour: "HH:mm"
legend:
show: true
series:
- entity: sensor.temperature
name: Temperature
color: "#e74c3c"
stroke_width: 2"span": {"end": "now"}"span": {"end": "hour"}START
│
├─ Need simple sensor history (last 24-48h)?
│ └─ YES → Use history-graph (native)
│
├─ Need long-term trends (weeks/months)?
│ └─ YES → Use statistics-graph (native)
│
├─ Need minimalist design with moderate customization?
│ └─ YES → Use mini-graph-card (HACS)
│
└─ Need advanced features (annotations, comparisons, multi-axis)?
└─ YES → Use apexcharts-card (HACS)| Feature | History Graph | Statistics Graph | Mini-Graph-Card | ApexCharts |
|---|---|---|---|---|
| Type | Native | Native | HACS | HACS |
| UI Editor | ✅ Full | ✅ Full | ❌ YAML only | ❌ YAML only |
| Performance | ⚡ Fast | ⚡ Fast | ⚡ Fast | ⚠️ Moderate |
| Customization | 🔹 Basic | 🔹 Basic | 🔸 Good | 🔶 Extensive |
| Multiple Entities | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| Chart Types | Line | Line/Bar | Line/Bar | Line/Bar/Area/Column |
| Time Range | Hours | Calendar periods | Hours | Flexible spans |
| Statistics | Auto | Built-in | Manual | Manual |
| Best For | Quick history | Long-term trends | Clean design | Power users |
type: history-graph
entities:
- entity: sensor.temperature_living_room
name: Living Room
- entity: sensor.temperature_bedroom
name: Bedroom
hours_to_show: 24
refresh_interval: 0 # Default: auto-refreshhours_to_showtype: statistics-graph
entities:
- sensor.energy_daily
stat_types:
- mean
- min
- max
period:
calendar:
period: month
chart_type: linereferences/reference.mdtype: custom:mini-graph-card
entities:
- sensor.temperature_bedroom
- sensor.temperature_living_room
name: Temperature Comparison
hours_to_show: 24
points_per_hour: 2
line_width: 2
font_size: 75type: custom:mini-graph-card
entities:
- entity: sensor.temperature
name: Temp
color: '#e74c3c'
- entity: sensor.humidity
name: Humidity
color: '#3498db'
y_axis: secondary
show:
labels: true
legend: true
name: true
state: truereferences/reference.mdexamples/examples.mdspan.endspan:
end: minute # Start of current minute
end: hour # Start of current hour (RECOMMENDED)
end: day # Start of current day
end: week # Start of current week
end: month # Start of current month
end: year # Start of current year
end: isoWeek # Start of ISO week (Monday)"now"type: custom:apexcharts-card
header:
show: true
title: Temperature History
show_states: true
graph_span: 24h
span:
end: hour # REQUIRED
yaxis:
- min: 0
max: 50
decimals: 1
apex_config:
chart:
height: 200
xaxis:
type: datetime
labels:
datetimeFormatter:
hour: "HH:mm"
legend:
show: true
series:
- entity: sensor.temperature_living_room
name: Living Room
color: "#e74c3c"
stroke_width: 2
- entity: sensor.temperature_bedroom
name: Bedroom
color: "#3498db"
stroke_width: 2type: custom:apexcharts-card
header:
show: true
title: Temperature & Humidity
show_states: true
graph_span: 24h
span:
end: hour
yaxis:
- id: temp
min: 0
max: 50
decimals: 1
- id: humidity
opposite: true
min: 0
max: 100
apex_config:
chart:
height: 250
xaxis:
type: datetime
labels:
datetimeFormatter:
hour: "HH:mm"
series:
- entity: sensor.temperature
name: Temperature
yaxis_id: temp
color: '#e74c3c'
stroke_width: 2
- entity: sensor.humidity
name: Humidity
yaxis_id: humidity
color: '#3498db'
stroke_width: 2references/reference.mdspan.endpoints_per_hour