The history graph card allows you to display a graph for each of up to eight entities.
Screenshot of the history graph card, when the sensor has no `unit_of_measurement` defined.
Screenshot of the history graph card, when the sensor has a `unit_of_measurement` defined.
To add the history 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.
The following YAML options are available when you use YAML mode or just prefer to use YAML in the code editor in the UI.
Hours to show in graph. Minimum is 1 hour. Big values can result in delayed rendering, especially if the selected entities have a lot of state changes.
If true, numerical values on the Y-axis will be displayed with a logarithmic scale.
If you define entities as objects instead of strings, you can add more customization and configuration:
title: 'My Graph'
- entity: media_player.lounge_room
name: Main player
Or with longer time frame, and multiple entities (as long as they share the same unit_of_measurement) in one graph:
title: "Temperatures in the last 48 hours"
- entity: sensor.lounge_temperature
- entity: sensor.attic_temperature