History Graph Card


The History Graph card allows you to display a graph for each of the entities listed.

Screenshot of the history graph card for entities without a unit_of_measurement Screenshot of the History Graph card, when the sensor has no `unit_of_measurement` defined.

Screenshot of the history graph card for entities with a unit_of_measurement 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, click the Lovelace menu (three dots at the top right of the screen) and then Edit Dashboard. Click the plus button in the bottom right corner and select History Graph from the card picker. All options for this card can be configured via the user interface.

Configuration Variables

type string Required

history-graph

entities list Required

A list of entity IDs or entity objects, see below.

hours_to_show integer (Optional, default: 24)

Hours to show. Minimum is 1 hour, maximum of 80 hours.

refresh_interval integer (Optional, default: 0)

Refresh interval in seconds.

title string (Optional)

The card title.

Options For Entities

If you define entities as objects instead of strings, you can add more customization and configuration:

Configuration Variables

entity string Required

Home Assistant entity ID.

name string (Optional)

Overwrites friendly name.

Example

Alternatively, the card can be configured using YAML:

type: history-graph
title: 'My Graph'
entities:
  - sensor.outside_temperature
  - entity: media_player.lounge_room
    name: Main player