State bands¶
A state-bands chart shows when an entity was in each named state and how long that state lasted. Use it for named conditions rather than numeric trends.
It works well for heating modes, occupancy, machine states, alarms, doors, or another entity where duration and transitions matter more than a numeric trend.
The state band sparkline is inspired by the Sleep Cycle visualizations from Apple Health and others.

Basic configuration¶
This example shows when a climate system was off, heating, or cooling:
Configuration options¶
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
show.chart_type | string | No | line | Set to state_bands to display a categorical state timeline. |
state_map.map[].state | string | Yes | - | Matches a Home Assistant state. |
state_map.map[].label | string | No | state value | Sets the state label shown on the Y-axis. |
state_map.map[].value | number | Yes | - | Sets the vertical level of the state. |
state_bands.update_interval | duration | No | 5min | Optional refresh interval for an ongoing current state. Leave the default for normal use. |
color_stops | mapping | No | none | Assigns a color to every named state. |
show.axis.x, show.axis.y | boolean | No | false | Shows the time or state axis. |
show.labels.x, show.labels.y | boolean | No | false | Shows labels along the enabled axes. |
Basic state bands¶
Each map entry gives a state its visible label and vertical level.
Add state colors¶
Show axes and labels¶
State bands can show time on the X-axis and state labels on the Y-axis: