# gabrielmazor/lovelace-savvy-cards architecture

> Architecture diagram of the GitHub repository gabrielmazor/lovelace-savvy-cards, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gabrielmazor/lovelace-savvy-cards
- Repository: https://github.com/gabrielmazor/lovelace-savvy-cards

## Overview

Savvy Cards is a set of Home Assistant dashboard cards. A user configures a card for an area or entity; cards discover matching entities, render device or room information, and can invoke Home Assistant controls. The optional settings card supplies shared pages and defaults. The graph preserves the documented card families and shared editor/control layers. Some subsystem links are documented only in the README; unsampled card implementations are represented by their exact source paths, without inferred call links.

Main entry points: [`src/cards/climate.js`](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/climate.js) (Climate card), [`src/cards/camera.js`](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/camera.js) (Camera card), [`src/cards/settings.js`](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/settings.js) (Settings card), [`src/core/95-settings.js`](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/core/95-settings.js) (Settings resolution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_headers_rooms["Headers and rooms"]
  node_home_header["Home header<br/>[home-header.js]"]
  node_room_header["Room header<br/>[room-header.js]"]
  node_section_title["Section title<br/>[section-title.js]"]
  node_room_tile["Room tiles<br/>[tile.js]"]
end

subgraph group_devices["Device cards"]
  node_lights["Lights card<br/>[lights.js]"]
  node_climate["Climate card<br/>[climate.js]"]
  node_media["Media card<br/>[media.js]"]
  node_camera["Camera card<br/>[camera.js]"]
  node_lock["Lock card<br/>[lock.js]"]
  node_vacuum["Vacuum card<br/>[vacuum.js]"]
  node_other_devices["Other device cards"]
end

subgraph group_insights["Activity and insights"]
  node_room_activity["Room activity<br/>[room-activity.js]"]
  node_graph["History graph<br/>[graph.js]"]
  node_last_check["Last check<br/>[last-check.js]"]
  node_system_health["System health<br/>[system-health.js]"]
end

subgraph group_shared["Shared card layer"]
  node_settings["Settings card<br/>[settings.js]"]
  node_settings_core["Settings resolution<br/>[95-settings.js]"]
  node_visual_editor["Visual editor<br/>[90-editor.js]"]
  node_entity_rows["Entity rows<br/>[72-rows.js]"]
  node_row_controls["Row controls<br/>[71-controls.js]"]
end

node_user(("Dashboard user"))
node_ha{{"Home Assistant"}}

node_user -->|"configures"| node_lights
node_ha -->|"provides entities"| node_lights
node_ha -->|"provides entities"| node_climate
node_ha -->|"provides entities"| node_media
node_ha -->|"provides cameras"| node_camera
node_ha -->|"provides state"| node_vacuum
node_ha -->|"provides entities"| node_room_activity
node_user -->|"sets defaults"| node_settings
node_settings -->|"publishes settings"| node_settings_core
node_settings_core -->|"resolves inheritance"| node_visual_editor
node_user -->|"edits options"| node_visual_editor
node_entity_rows -->|"builds controls"| node_row_controls
node_climate -->|"calls services"| node_ha
node_camera -->|"signs paths"| node_ha

click node_home_header "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/home-header.js"
click node_room_header "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/room-header.js"
click node_section_title "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/section-title.js"
click node_room_tile "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/tile.js"
click node_lights "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/lights.js"
click node_climate "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/climate.js"
click node_media "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/media.js"
click node_camera "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/camera.js"
click node_lock "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/lock.js"
click node_vacuum "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/vacuum.js"
click node_other_devices "https://github.com/gabrielmazor/lovelace-savvy-cards/tree/main/src/cards"
click node_room_activity "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/room-activity.js"
click node_graph "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/graph.js"
click node_last_check "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/last-check.js"
click node_system_health "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/system-health.js"
click node_settings "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/settings.js"
click node_settings_core "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/core/95-settings.js"
click node_visual_editor "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/core/90-editor.js"
click node_entity_rows "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/core/72-rows.js"
click node_row_controls "https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/core/71-controls.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_home_header,node_room_header,node_section_title,node_room_tile,node_user toneBlue
class node_lights,node_climate,node_media,node_camera,node_lock,node_vacuum,node_other_devices toneAmber
class node_room_activity,node_graph,node_last_check,node_system_health toneMint
class node_settings,node_settings_core,node_visual_editor,node_entity_rows,node_row_controls toneRose
class node_ha toneIndigo
```

## Components

### Headers and rooms

- [Home header](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/home-header.js): `src/cards/home-header.js`
- [Room header](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/room-header.js): `src/cards/room-header.js`
- [Section title](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/section-title.js): `src/cards/section-title.js`
- [Room tiles](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/tile.js): `src/cards/tile.js`

### Device cards

- [Lights card](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/lights.js): `src/cards/lights.js`
- [Climate card](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/climate.js): `src/cards/climate.js`
- [Media card](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/media.js): `src/cards/media.js`
- [Camera card](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/camera.js): `src/cards/camera.js`
- [Lock card](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/lock.js): `src/cards/lock.js`
- [Vacuum card](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/vacuum.js): `src/cards/vacuum.js`
- [Other device cards](https://github.com/gabrielmazor/lovelace-savvy-cards/tree/main/src/cards): `src/cards`

### Activity and insights

- [Room activity](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/room-activity.js): `src/cards/room-activity.js`
- [History graph](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/graph.js): `src/cards/graph.js`
- [Last check](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/last-check.js): `src/cards/last-check.js`
- [System health](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/system-health.js): `src/cards/system-health.js`

### Shared card layer

- [Settings card](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/cards/settings.js): `src/cards/settings.js`
- [Settings resolution](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/core/95-settings.js): `src/core/95-settings.js`
- [Visual editor](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/core/90-editor.js): `src/core/90-editor.js`
- [Entity rows](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/core/72-rows.js): `src/core/72-rows.js`
- [Row controls](https://github.com/gabrielmazor/lovelace-savvy-cards/blob/main/src/core/71-controls.js): `src/core/71-controls.js`

### Other components

- **Dashboard user**
- **Home Assistant**

## Connections

- Dashboard user → Lights card: configures (evidence: `README.md`)
- Home Assistant → Lights card: provides entities (evidence: `README.md`)
- Home Assistant → Climate card: provides entities (evidence: `README.md`)
- Home Assistant → Media card: provides entities (evidence: `README.md`)
- Home Assistant → Camera card: provides cameras (evidence: `src/cards/camera.js`)
- Home Assistant → Vacuum card: provides state (evidence: `src/cards/vacuum.js`)
- Home Assistant → Room activity: provides entities (evidence: `README.md`)
- Dashboard user → Settings card: sets defaults (evidence: `README.md`)
- Settings card → Settings resolution: publishes settings (evidence: `src/core/95-settings.js`)
- Settings resolution → Visual editor: resolves inheritance (evidence: `src/core/90-editor.js`)
- Dashboard user → Visual editor: edits options (evidence: `src/core/90-editor.js`)
- Entity rows → Row controls: builds controls (evidence: `src/core/72-rows.js`)
- Climate card → Home Assistant: calls services (evidence: `src/cards/climate.js`)
- Camera card → Home Assistant: signs paths (evidence: `src/cards/camera.js`)
