Home Features Sources Install Docs FAQ

Documentation

Complete configuration reference for Chronicle Card.

Installation

HACS Custom Repo (Recommended)

HACS Default store listing is pending. For now, install as a custom repository:

  1. Open HACS in your Home Assistant instance
  2. Click the three-dot menu (top right) → Custom repositories
  3. Paste https://github.com/KadenThomp36/chronicle-card and select Dashboard as the category
  4. Click Add, then find Chronicle Card and click Download
  5. Go to Settings → Dashboards → Resources, click Add, and enter /hacsfiles/chronicle-card/chronicle-card.js as JavaScript Module
  6. Restart Home Assistant

Manual Installation

  1. Download chronicle-card.js from the latest release
  2. Copy to /config/www/chronicle-card.js
  3. Add the resource in Settings → Dashboards → Resources:
    URL: /local/chronicle-card.js, Type: JavaScript Module

Quick Start

Add a new card to any dashboard and paste the following minimal configuration:

yaml
type: custom:chronicle-card title: Home Timeline sources: - type: calendar entity: calendar.home_events

Card Options

Top-level configuration options for the card.

OptionTypeDefaultDescription
typestringRequiredMust be custom:chronicle-card
titlestring""Card title displayed in the header
layoutstringverticalvertical or horizontal
show_layout_togglebooleantrueShow button to switch layouts
max_eventsnumber50Maximum events to display
days_backnumber7How many days of history to fetch
time_formatstring24h12h or 24h
languagestringautoOverride language (en, de, fr, es, it, pt, nl, sv)
show_headerbooleantrueShow the card header
sourceslistRequiredArray of source configurations
filtersobject{}Filter configuration
groupingobject{}Grouping configuration
appearanceobject{}Appearance configuration

Sources

Chronicle supports four source types. Each source feeds events into the unified timeline. You can combine any number and type of sources in a single card.

Calendar Source

Reads events from a Home Assistant calendar entity.

yaml
sources: - type: calendar entity: calendar.home_events name: Home Events default_icon: mdi:calendar default_color: "#4CAF50" default_severity: info
OptionTypeDescription
entitystringCalendar entity ID

REST / WebSocket Source

Fetches events from a REST API endpoint or via Home Assistant WebSocket messages. Use field_map to map response fields to Chronicle's event schema.

REST Example

yaml
sources: - type: rest url: /api/some_integration/events name: My Events response_path: data.events field_map: id: uid title: name start: timestamp description: details mediaUrl: image_url category: type poll_interval: 60

WebSocket Example (Frigate)

yaml
sources: - type: rest name: Frigate Events ws_params: type: frigate/events/get limit: 50 field_map: id: id title: label start: start_time category: label entityId: camera media_url_template: /api/frigate/notifications/{id}/snapshot.jpg
OptionTypeDescription
urlstringREST API endpoint URL
ws_paramsobjectWebSocket message parameters (alternative to url)
response_pathstringDot-notation path to the events array in the response
field_mapobjectMaps response fields to Chronicle event fields
media_url_templatestringTemplate for media URLs with {field} placeholders
poll_intervalnumberPolling interval in seconds

Field Map Keys

KeyDescription
idUnique event identifier
titleEvent title / summary
descriptionEvent description
startStart time (ISO string or Unix timestamp)
endEnd time
mediaUrlDirect URL to media (image/thumbnail)
mediaContentIdHA media content ID
iconMDI icon override
colorColor override
categoryEvent category for grouping / filtering
labelDisplay label
severitySeverity level
entityIdAssociated entity ID
entityNameAssociated entity name

History Source

Converts entity state changes into timeline events. Each history source watches a single entity — add one source per entity you want to track. Setting name on a history source overrides the entity's friendly_name in event titles. Chronicle reads the device_class attribute for smart human-readable translations, and automatically deduplicates repeated words in titles and descriptions (e.g. “Doorbell Motion Motion Cleared” becomes “Doorbell Motion Cleared”).

yaml
sources: - type: history entity: binary_sensor.front_door name: Front Door default_severity: warning - type: history entity: lock.front_door_lock name: Front Door Lock default_severity: warning - type: history entity: alarm_control_panel.home name: Alarm Panel default_severity: warning

Custom State Map

Override the default state translations with a custom state_map:

yaml
sources: - type: history entity: binary_sensor.garage_tilt name: Garage state_map: "on": "Garage Opened" "off": "Garage Closed"

State Filter

Use state_filter to only create events when the new state matches one of the listed values. For example, to log only when a motion sensor turns on (ignoring the “off” / cleared transition):

yaml
sources: - type: history entity: binary_sensor.hallway_motion name: Hallway Motion state_filter: - "on"

Device Class Translations

The following device classes are automatically translated when no state_map is provided:

Device ClassOn StateOff State
door / opening / windowOpenedClosed
motionMotion DetectedMotion Cleared
lockUnlockedLocked
smokeSmoke DetectedClear
moistureWetDry
occupancyOccupiedUnoccupied
presencePresentAway
vibrationVibrationStill
connectivityConnectedDisconnected
batteryLowNormal

History Source Options

OptionTypeDescription
entitystringEntity ID to track (one entity per history source)
state_filterstring[]Only create events when the new state matches a value in this list. E.g. ["on"] to ignore “off” transitions.
state_mapobjectMap of state values to custom display strings

Static Source

Define events directly in YAML. Useful for reminders, scheduled tasks, or manually curated events.

yaml
sources: - type: static name: Reminders events: - title: Change HVAC Filter start: "2025-04-01T10:00:00" icon: mdi:air-filter color: "#FF9800" severity: info category: maintenance

Source Options (All Types)

These options are available on every source type.

OptionTypeDescription
typestringSource type: calendar, rest, history, or static
namestringDisplay name for the source
default_iconstringFallback MDI icon for events from this source
default_colorstringFallback color for events from this source
default_severitystringFallback severity level (critical, warning, info, debug)
icon_mapobjectMap of category/keyword to MDI icon
color_mapobjectMap of category/keyword to color
actionslistAction buttons for events from this source

Filters

Filter events by category, severity, source, entity, or free-text search. The visual editor exposes these as a dedicated Filters section with a search field, comma-separated categories input, severity checkboxes (critical, warning, info, debug), and source/entity dropdowns.

yaml
filters: categories: - person - vehicle severities: - critical - warning sources: - Frigate Events entities: - binary_sensor.front_door search: "front door"
OptionTypeDescription
categorieslistOnly show events matching these categories
severitieslistOnly show events matching these severity levels
sourceslistOnly show events from these source names
entitieslistOnly show events from these entity IDs
searchstringFree-text search across event titles and descriptions

Grouping

Group nearby events together to reduce visual clutter. The grouping window uses a sliding comparison — each event is compared to the previous event in the group rather than the first, which produces more natural chaining of related events. Group summaries are context-aware: when all grouped events share the same label the summary uses that label (e.g. “7 cat events”), and when events are mixed it falls back to the source or entity name (e.g. “7 Frigate events”).

yaml
grouping: enabled: true window_seconds: 120 min_group_size: 3 group_by: category
OptionTypeDefaultDescription
enabledbooleanfalseEnable event grouping
window_secondsnumber120Sliding time window (in seconds) — each event is compared to the previous event in the group
min_group_sizenumber3Minimum number of events to form a group
group_bystringcategorycategory, source, entity, or none

Appearance

Fine-tune the visual style of the card.

yaml
appearance: card_height: 400px compact: false show_images: true show_icons: true show_severity_badge: true show_source_badge: false animate_new_events: true severity_colors: critical: "#D32F2F" warning: "#FF9800" info: "#2196F3" debug: "#9E9E9E"
OptionTypeDefaultDescription
card_heightstring400pxFixed height of the card body
compactbooleanfalseUse compact event rows
show_imagesbooleantrueShow event thumbnails
show_iconsbooleantrueShow event icons
show_severity_badgebooleantrueShow severity labels on events
show_source_badgebooleanfalseShow source name badge on events
animate_new_eventsbooleantrueAnimate new events as they arrive
severity_colorsobject(built-in)Override severity level colors

Actions

Add action buttons to events. Actions can navigate, call services, or fire custom events.

yaml
sources: - type: calendar entity: calendar.cameras actions: - label: View Camera icon: mdi:cctv type: navigate url: /lovelace/cameras - label: Dismiss icon: mdi:close type: service service: input_boolean.turn_off target: entity_id: input_boolean.alert_active - label: Trigger Alarm icon: mdi:alarm-light type: fire-event eventType: custom_alarm eventData: zone: front_yard
OptionTypeDescription
labelstringButton label text
iconstringMDI icon for the button
typestringAction type: service, navigate, or fire-event
servicestringService to call (for service type)
serviceDataobjectAdditional data for the service call
targetobjectTarget entity/device/area for the service call
urlstringURL to navigate to (for navigate type)
eventTypestringCustom event type (for fire-event type)
eventDataobjectData payload for the custom event

Icon & Color Resolution

Chronicle resolves icons and colors through a 5-level chain. The first match wins.

  1. color_map / icon_map — custom per-source overrides
  2. default_color / default_icon — per-source fallback values
  3. Fuzzy keyword inference — 150+ built-in rules that match event titles and categories
  4. Category defaults — built-in icons for common categories
  5. Global fallback — mdi:calendar-clock / #78909C

Keyword Match Examples

KeywordsIconColor
cat, kitten, felinemdi:cat#7f41eb
dog, puppy, caninemdi:dog#8D6E63
person, visitormdi:walk#FF9800
car, truck, vehiclemdi:car#2196F3
package, deliverymdi:package-variant-closed#795548
alarm, alertmdi:alarm-light#F44336
door, gatemdi:door#795548
motionmdi:motion-sensor#9C27B0
camera, cctvmdi:cctv#FF5722
light, lampmdi:lightbulb#FFC107
temperaturemdi:thermostat#00BCD4

Override Example

yaml
sources: - type: rest url: /api/my/events icon_map: garage: mdi:garage backyard: mdi:tree color_map: garage: "#795548" backyard: "#4CAF50"

Severity System

Chronicle supports four severity levels. Each event can have a severity set via the source default_severity, field_map, or static event config. Severity badges appear on events and can be restyled via appearance.severity_colors.

LevelDefault ColorUse Case
Critical#D32F2FAlarm triggers, smoke detection, security breaches
Warning#FF9800Person detected, door opened, unusual activity
Info#2196F3Calendar events, routine activity, status changes
Debug#9E9E9ELow-priority logs, diagnostic data

Layouts

Chronicle provides two layout modes:

  • Vertical (default) — A scrollable timeline with a timeline line and event nodes. Best for detailed event inspection.
  • Horizontal — A ribbon layout for compact display (e.g., camera events as a horizontal strip). Best for dashboards with limited vertical space.

Toggle between them at runtime with show_layout_toggle: true, or set a fixed layout:

yaml
type: custom:chronicle-card layout: horizontal show_layout_toggle: false

Log Event Blueprint

A ready-to-use Home Assistant automation blueprint is included at blueprints/chronicle_log_event.yaml. It logs entity state changes to a calendar entity, which Chronicle then reads as timeline events.

Blueprint Inputs

InputDescription
Trigger EntityThe entity to watch for state changes
Trigger State (optional)Only log when entity enters this specific state
Target CalendarCalendar entity where events are written
Event TitleTemplate-supported title (default: friendly name + state)
Event DescriptionTemplate-supported description body
Event DurationDuration in minutes
Additional ConditionOptional extra condition to gate logging

Usage Example

yaml
automation: - alias: Log Front Door Activity trigger: - platform: state entity_id: binary_sensor.front_door to: "on" action: - service: calendar.create_event target: entity_id: calendar.home_timeline data: summary: "Front door opened" description: "Door sensor triggered" start_date_time: "{{ now().isoformat() }}" end_date_time: "{{ (now() + timedelta(minutes=1)).isoformat() }}"

Import the blueprint directly: Import Blueprint

Example: Frigate Camera Events

Display Frigate NVR detections with snapshot thumbnails in a timeline.

yaml
type: custom:chronicle-card title: Camera Events sources: - type: rest name: Frigate Events ws_params: type: frigate/events/get limit: 50 field_map: id: id title: label start: start_time end: end_time category: label entityId: camera media_url_template: /api/frigate/notifications/{id}/snapshot.jpg default_severity: warning

Example: Multi-Source Home Timeline

Combine calendar events, camera detections, and door sensor history in one view.

yaml
type: custom:chronicle-card title: Home Timeline days_back: 7 max_events: 100 sources: - type: calendar entity: calendar.home_events name: Calendar default_icon: mdi:calendar default_color: "#4CAF50" default_severity: info - type: rest name: Frigate ws_params: type: frigate/events/get limit: 50 field_map: id: id title: label start: start_time category: label entityId: camera media_url_template: /api/frigate/notifications/{id}/snapshot.jpg default_severity: warning - type: history entity: binary_sensor.front_door name: Front Door default_severity: warning - type: history entity: binary_sensor.back_door name: Back Door default_severity: warning - type: history entity: lock.front_door_lock name: Front Door Lock default_severity: warning

Example: Compact Security Log

A compact, filtered view showing only security-relevant events.

yaml
type: custom:chronicle-card title: Security Log sources: - type: history entity: binary_sensor.front_door name: Front Door default_severity: warning - type: history entity: binary_sensor.back_door name: Back Door default_severity: warning - type: history entity: binary_sensor.garage_door name: Garage Door default_severity: warning - type: history entity: lock.front_door_lock name: Front Door Lock default_severity: warning - type: history entity: alarm_control_panel.home name: Alarm Panel default_severity: warning appearance: compact: true show_images: false filters: severities: - critical - warning

Example: Horizontal Camera Ribbon

Show Frigate events as a horizontal scrolling ribbon with thumbnails.

yaml
type: custom:chronicle-card title: Camera Ribbon layout: horizontal show_layout_toggle: false sources: - type: rest name: Frigate ws_params: type: frigate/events/get limit: 20 field_map: id: id title: label start: start_time category: label entityId: camera media_url_template: /api/frigate/notifications/{id}/snapshot.jpg

Example: Logging Automations

Use Home Assistant automations to write events into a calendar entity that Chronicle reads. This approach lets you log any state change, webhook, or trigger as a timeline event.

yaml
# Automation that logs motion events to a calendar automation: - alias: Log Motion to Timeline trigger: - platform: state entity_id: binary_sensor.hallway_motion to: "on" action: - service: calendar.create_event target: entity_id: calendar.home_timeline data: summary: "Motion detected in hallway" description: "Hallway motion sensor triggered" start_date_time: "{{ now().isoformat() }}" end_date_time: "{{ (now() + timedelta(minutes=1)).isoformat() }}" # Then read it with Chronicle type: custom:chronicle-card title: Activity Log sources: - type: calendar entity: calendar.home_timeline

Localization

Chronicle auto-detects the language from your Home Assistant locale. Override it with the language card option.

CodeLanguage
enEnglish
deGerman
frFrench
esSpanish
itItalian
ptPortuguese
nlDutch
svSwedish
yaml
type: custom:chronicle-card language: de

Development

To build and develop Chronicle Card locally:

bash
npm install npm run build npm run watch

Output is written to dist/chronicle-card.js. Copy it to your Home Assistant /config/www/ directory during development.