# harpalpannu/wind-compass architecture

> Architecture diagram of the GitHub repository harpalpannu/wind-compass, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harpalpannu/wind-compass
- Repository: https://github.com/harpalpannu/wind-compass

## Overview

Wind Compass is a single-file Home Assistant Lovelace card. The principal workflow is to configure wind sensor entities, display their readings as a compass and telemetry, and open Home Assistant’s native history dialog when the dial or a metric is clicked. The README documents these capabilities; the source excerpt confirms entity configuration, dial-color generation, state formatting, and click handlers. The implementation is not split into separate repository subsystems.

Main entry points: [`wind-compass.js`](https://github.com/harpalpannu/wind-compass/blob/main/wind-compass.js) (Wind Compass card)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_dashboard_user(("Dashboard user"))
node_wind_entities["Wind sensor entities"]
node_wind_compass["Wind Compass card<br/>[wind-compass.js]"]
node_history_dialog["HA history dialog"]

node_wind_entities -->|"provides readings"| node_wind_compass
node_dashboard_user -->|"views and clicks"| node_wind_compass
node_wind_compass -->|"opens history"| node_history_dialog

click node_wind_compass "https://github.com/harpalpannu/wind-compass/blob/main/wind-compass.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_dashboard_user toneBlue
class node_wind_entities,node_history_dialog toneIndigo
class node_wind_compass toneTeal
```

## Components

### Other components

- **Dashboard user**
- **Wind sensor entities**
- [Wind Compass card](https://github.com/harpalpannu/wind-compass/blob/main/wind-compass.js): `wind-compass.js`
- **HA history dialog**

## Connections

- Wind sensor entities → Wind Compass card: provides readings (evidence: `README.md`)
- Dashboard user → Wind Compass card: views and clicks (evidence: `README.md`)
- Wind Compass card → HA history dialog: opens history (evidence: `README.md`)
