Skip to content
Logbook card for Home Assistant UI Lovelace
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
images Improve style to be more close to Lovelace default card Oct 23, 2019
LICENSE Initial commit Oct 18, 2019 Add type for attributes Nov 14, 2019
hacs.json Add Hacs support and update documentaion Oct 18, 2019 Fix screenshot Oct 18, 2019
logbook-card.js Fix issue with duration on state squash Jan 3, 2020

Logbook card

A custom Lovelace component for displaying history of an entity for Home Assistant.

logbook card example

hacs_badge GitHub version GitHub license



This card is available in HACS (Home Assistant Community Store).


Download the logbook-card.js from the latest release and store it in your configuration/www folder. Configure Lovelace to load the card:

  - url: /local/logbook-card.js?v=1
    type: js

Using the card


Card options

Name Type Required Since Default Description
type string required v0.1 custom:logbook-card
entity string required v0.1 An entity_id.
title string optional v0.1 friendly_name History Card title
history integer optional v0.1 5 Numbers of days of history of the logbook
hiddenState string[] optional v0.1 [] States to hide
desc bool optional v0.1 True is logbook ordered descending
no_event string optional v0.1 No event on the period message displayed if no event to display
max_items integer optional v0.2 -1 Number of items to display. Ignored if < 0
state_map state map object optional v0.2 [] List of entity states to convert
show list optional v0.2 List of UI elements to display/hide, for available items see available show options.
attirbutes attributes object optional v0.4 List of attributes to display.

State map object

Name Type Default Description
value (required) string Value to convert.
label string same as value String to show as label.

Available show options

All properties are optional.

Name Default Options Description
state true true / false Display state
duration true true / false Display duration
start_date true true / false Display start date
end_date true true / false Display end date

Attribute object

Name Type Default Description
value (required) string name of the attributes.
label string same as value String to show as label.
type string string Type of the value used for formatting. Only date is currently supported

Example usage

Example with hidden states

type: 'custom:logbook-card'
desc: true
entity: sun.sun
  - above_horizon
title: Day history

Example with state label

entity: binary_sensor.garage_opening_sensor
max_items: 10
  - label: Open
    value: on
  - label: Closed
    value: off
title: 'Garage door history'
type: 'custom:logbook-card'
  end_date: false
  start_date: false

Example with attributes

type: 'custom:logbook-card'
desc: true
entity: sun.sun
title: Day history
  - value: elevation
  - value: next_rising
    label: Next Rising
You can’t perform that action at this time.