Statistics graph card
The statistics graph card allows you to display a graph of statistics data for each of the entities listed.
Screenshot of the statistics graph card with none metered entities and `chart_type` `line`.
Screenshot of the statistics graph card with a metered entity and `chart_type` `bar`.
Statistics are gathered every 5 minutes for sensors that support it. It will either keep the min
, max
, and mean
of a sensor’s value for a specific hour or the sum
for a metered entity.
If your sensor doesn’t work with statistics, check this.
To add the statistics graph card to your user interface:
- In the top right of the screen, select the three dots menu and then select Edit dashboard.
- By editing the dashboard, you are taking over control of this dashboard. This means that it is no longer automatically updated when new dashboard elements become available. To continue, in the dialog, select Take control.
- In the bottom right corner, select the Add card button and select from the card picker.
All options for this card can be configured via the user interface.
YAML configuration
The following YAML options are available when you use YAML mode or just prefer to use YAML in the code editor in the UI.
Configuration Variables
A list of entity IDs or entity
objects (see below), or an external statistic id
Options for entities
If you define entities as objects instead of strings, you can add more customization and configuration:
Example
type: statistics-graph
title: 'My Graph'
entities:
- sensor.outside_temperature
- entity: sensor.inside_temperature
name: Inside