# fryyyyy/zeekr_homeassistant architecture

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

- Interactive diagram: https://gitdiagram.com/fryyyyy/zeekr_homeassistant
- Repository: https://github.com/fryyyyy/zeekr_homeassistant

## Overview

This is a Home Assistant custom integration for monitoring and controlling Zeekr EVs. Users configure an account, after which the integration coordinates vehicle data and exposes it as Home Assistant entities; entity commands can invoke vehicle operations. The graph preserves the documented sensor, climate, charging, access, window, and tracking capabilities. Several platform implementations were not excerpted, so their coordinator relationships are supported by the SOURCE INDEX, while platform registration is shown as unverified.

Main entry points: [`custom_components/zeekr_ev/coordinator.py`](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/coordinator.py) (Vehicle Coordinator), [`custom_components/zeekr_ev/__init__.py`](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/__init__.py) (Integration Setup), [`custom_components/zeekr_ev/config_flow.py`](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/config_flow.py) (Account Setup), [`custom_components/zeekr_ev/entity.py`](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/entity.py) (Shared Entity Logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup &amp; Configuration"]
  node_config["Account Setup<br/>[config_flow.py]"]
  node_integration["Integration Setup<br/>[__init__.py]"]
  node_constants["Platforms &amp; Settings<br/>[const.py]"]
end

subgraph group_runtime["Vehicle Runtime"]
  node_coordinator["Vehicle Coordinator<br/>[coordinator.py]"]
  node_zeekr_api["Zeekr EV API"]
end

subgraph group_telemetry["Status Entities"]
  node_sensors["Vehicle Sensors<br/>[sensor.py]"]
  node_binary["Status Sensors<br/>[binary_sensor.py]"]
  node_tracker["Vehicle Location<br/>[device_tracker.py]"]
end

subgraph group_controls["Vehicle Controls"]
  node_climate["Climate Controls<br/>[climate.py]"]
  node_covers["Windows &amp; Hood<br/>[cover.py]"]
  node_switches["Vehicle Switches<br/>[switch.py]"]
  node_buttons["Vehicle Actions<br/>[button.py]"]
  node_locks["Door &amp; Trunk Locks<br/>[lock.py]"]
  node_selects["Vehicle Selects<br/>[select.py]"]
  node_numbers["Vehicle Numbers<br/>[number.py]"]
  node_schedule_time["Charge Schedule Times<br/>[time.py]"]
  node_departure["Departure Schedule<br/>[datetime.py]"]
end

subgraph group_support["Shared Services"]
  node_entity["Shared Entity Logic<br/>[entity.py]"]
  node_request_stats[("Request Statistics<br/>[request_stats.py]")]
  node_setup_errors["Setup Errors<br/>[setup_errors.py]"]
  node_utils["API Utilities<br/>[utils.py]"]
end

node_user(("Home Assistant User"))

node_user -->|"configures"| node_config
node_config -.->|"sets up"| node_integration
node_config -->|"uses"| node_setup_errors
node_config -->|"validates with"| node_utils
node_integration -->|"creates"| node_coordinator
node_integration -->|"initializes"| node_request_stats
node_integration -->|"reads settings"| node_constants
node_integration -.->|"registers platforms"| node_sensors
node_coordinator -->|"fetches vehicle data"| node_zeekr_api
node_coordinator -->|"counts requests"| node_request_stats
node_sensors -->|"reads updates"| node_coordinator
node_binary -->|"reads updates"| node_coordinator
node_tracker -->|"reads updates"| node_coordinator
node_climate -->|"reads and commands"| node_coordinator
node_covers -->|"reads and commands"| node_coordinator
node_switches -->|"reads and commands"| node_coordinator
node_buttons -->|"uses vehicle data"| node_coordinator
node_locks -->|"uses vehicle data"| node_coordinator
node_selects -->|"uses vehicle data"| node_coordinator
node_numbers -->|"uses vehicle data"| node_coordinator
node_schedule_time -->|"reads and commands"| node_coordinator
node_departure -->|"reads and commands"| node_coordinator
node_climate -->|"extends"| node_entity
node_covers -->|"extends"| node_entity
node_schedule_time -->|"extends"| node_entity
node_departure -->|"extends"| node_entity

click node_config "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/config_flow.py"
click node_integration "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/__init__.py"
click node_constants "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/const.py"
click node_coordinator "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/coordinator.py"
click node_sensors "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/sensor.py"
click node_binary "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/binary_sensor.py"
click node_tracker "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/device_tracker.py"
click node_climate "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/climate.py"
click node_covers "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/cover.py"
click node_switches "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/switch.py"
click node_buttons "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/button.py"
click node_locks "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/lock.py"
click node_selects "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/select.py"
click node_numbers "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/number.py"
click node_schedule_time "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/time.py"
click node_departure "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/datetime.py"
click node_entity "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/entity.py"
click node_request_stats "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/request_stats.py"
click node_setup_errors "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/setup_errors.py"
click node_utils "https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/utils.py"

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_config,node_integration,node_constants,node_user toneBlue
class node_coordinator,node_zeekr_api toneAmber
class node_sensors,node_binary,node_tracker toneMint
class node_climate,node_covers,node_switches,node_buttons,node_locks,node_selects,node_numbers,node_schedule_time,node_departure toneRose
class node_entity,node_request_stats,node_setup_errors,node_utils toneIndigo
```

## Components

### Setup & Configuration

- [Account Setup](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/config_flow.py): `custom_components/zeekr_ev/config_flow.py`
- [Integration Setup](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/__init__.py): `custom_components/zeekr_ev/__init__.py`
- [Platforms & Settings](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/const.py): `custom_components/zeekr_ev/const.py`

### Vehicle Runtime

- [Vehicle Coordinator](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/coordinator.py): `custom_components/zeekr_ev/coordinator.py`
- **Zeekr EV API**

### Status Entities

- [Vehicle Sensors](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/sensor.py): `custom_components/zeekr_ev/sensor.py`
- [Status Sensors](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/binary_sensor.py): `custom_components/zeekr_ev/binary_sensor.py`
- [Vehicle Location](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/device_tracker.py): `custom_components/zeekr_ev/device_tracker.py`

### Vehicle Controls

- [Climate Controls](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/climate.py): `custom_components/zeekr_ev/climate.py`
- [Windows & Hood](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/cover.py): `custom_components/zeekr_ev/cover.py`
- [Vehicle Switches](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/switch.py): `custom_components/zeekr_ev/switch.py`
- [Vehicle Actions](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/button.py): `custom_components/zeekr_ev/button.py`
- [Door & Trunk Locks](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/lock.py): `custom_components/zeekr_ev/lock.py`
- [Vehicle Selects](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/select.py): `custom_components/zeekr_ev/select.py`
- [Vehicle Numbers](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/number.py): `custom_components/zeekr_ev/number.py`
- [Charge Schedule Times](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/time.py): `custom_components/zeekr_ev/time.py`
- [Departure Schedule](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/datetime.py): `custom_components/zeekr_ev/datetime.py`

### Shared Services

- [Shared Entity Logic](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/entity.py): `custom_components/zeekr_ev/entity.py`
- [Request Statistics](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/request_stats.py): `custom_components/zeekr_ev/request_stats.py`
- [Setup Errors](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/setup_errors.py): `custom_components/zeekr_ev/setup_errors.py`
- [API Utilities](https://github.com/fryyyyy/zeekr_homeassistant/blob/main/custom_components/zeekr_ev/utils.py): `custom_components/zeekr_ev/utils.py`

### Other components

- **Home Assistant User**

## Connections

- Home Assistant User → Account Setup: configures (evidence: `README.md`)
- Account Setup → Integration Setup: sets up
- Account Setup → Setup Errors: uses (evidence: `custom_components/zeekr_ev/config_flow.py`)
- Account Setup → API Utilities: validates with (evidence: `custom_components/zeekr_ev/config_flow.py`)
- Integration Setup → Vehicle Coordinator: creates (evidence: `custom_components/zeekr_ev/__init__.py`)
- Integration Setup → Request Statistics: initializes (evidence: `custom_components/zeekr_ev/__init__.py`)
- Integration Setup → Platforms & Settings: reads settings (evidence: `custom_components/zeekr_ev/__init__.py`)
- Integration Setup → Vehicle Sensors: registers platforms
- Vehicle Coordinator → Zeekr EV API: fetches vehicle data (evidence: `custom_components/zeekr_ev/coordinator.py`)
- Vehicle Coordinator → Request Statistics: counts requests (evidence: `custom_components/zeekr_ev/coordinator.py`)
- Vehicle Sensors → Vehicle Coordinator: reads updates (evidence: `custom_components/zeekr_ev/sensor.py`)
- Status Sensors → Vehicle Coordinator: reads updates (evidence: `custom_components/zeekr_ev/binary_sensor.py`)
- Vehicle Location → Vehicle Coordinator: reads updates (evidence: `custom_components/zeekr_ev/device_tracker.py`)
- Climate Controls → Vehicle Coordinator: reads and commands (evidence: `custom_components/zeekr_ev/climate.py`)
- Windows & Hood → Vehicle Coordinator: reads and commands (evidence: `custom_components/zeekr_ev/cover.py`)
- Vehicle Switches → Vehicle Coordinator: reads and commands (evidence: `custom_components/zeekr_ev/switch.py`)
- Vehicle Actions → Vehicle Coordinator: uses vehicle data (evidence: `custom_components/zeekr_ev/button.py`)
- Door & Trunk Locks → Vehicle Coordinator: uses vehicle data (evidence: `custom_components/zeekr_ev/lock.py`)
- Vehicle Selects → Vehicle Coordinator: uses vehicle data (evidence: `custom_components/zeekr_ev/select.py`)
- Vehicle Numbers → Vehicle Coordinator: uses vehicle data (evidence: `custom_components/zeekr_ev/number.py`)
- Charge Schedule Times → Vehicle Coordinator: reads and commands (evidence: `custom_components/zeekr_ev/time.py`)
- Departure Schedule → Vehicle Coordinator: reads and commands (evidence: `custom_components/zeekr_ev/datetime.py`)
- Climate Controls → Shared Entity Logic: extends (evidence: `custom_components/zeekr_ev/climate.py`)
- Windows & Hood → Shared Entity Logic: extends (evidence: `custom_components/zeekr_ev/cover.py`)
- Charge Schedule Times → Shared Entity Logic: extends (evidence: `custom_components/zeekr_ev/time.py`)
- Departure Schedule → Shared Entity Logic: extends (evidence: `custom_components/zeekr_ev/datetime.py`)
