Skip to content

Commit 80eafe0

Browse files
committed
Update Docs
1 parent 5ec27fe commit 80eafe0

1 file changed

Lines changed: 27 additions & 32 deletions

File tree

  • docs/smart-home/packages

docs/smart-home/packages/car.md

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,17 @@ version: 2.0.3
1717

1818
## Executive Summary
1919
<!-- START_SUMMARY -->
20-
The Car package centralizes all logic for the Mercedes GLC, interfacing with the `ReneNulschDE/mbapi2020` integration. It provides a standardized data layer by normalizing proprietary attributes (window states, door locks) into standard Home Assistant binary sensors. It includes API wrappers for common actions (locking, pre-heating) and a robust notification system for charging and critical alerts.
20+
The `Car` package provides a unified interface for the Mercedes GLC, leveraging the `mbapi2020` integration. It normalizes proprietary attribute data (e.g., window status codes, specific lock states) into standard Home Assistant binary sensors and device classes. The package includes a comprehensive automation suite (`notify_car_status_glc`) that monitors critical vehicle states—such as charging progress, pre-entry climate control, and fluid warnings—and dispatches actionable notifications via the `notify_smart_master` script.
2121
<!-- END_SUMMARY -->
2222

2323
## Process Description (Non-Technical)
2424
<!-- START_DETAILED -->
2525
### How It Works
26-
1. **Monitoring**: The house knows the status of your car windows, doors, and engine. You can see at a glance if the car is locked or if a window was left open.
27-
2. **Remote Control**: You can start the "Pre-entry Climate" system directly from the dashboard to warm up or cool down the car before you leave.
28-
3. **Charging**:
29-
* **Plugged In**: You get a confirmation notification when the cable is connected.
30-
* **Started**: When charging begins, you are notified of the current charging power (kW) and the estimated finish time.
31-
* **Finished**: You get an alert when the battery hits 100%.
32-
4. **Critical Alerts**: The system watches for vehicle warnings. If brake fluid is low or coolant is needed, a critical alert is sent to your phone immediately.
26+
* **Real-time Monitoring:** The system continuously checks the status of your car's doors, windows, and locks. You can instantly see if the car is secure or if the engine is running.
27+
* **Remote Control:** You can lock or unlock the doors and close the windows directly from your dashboard. Additionally, the "Pre-entry A/C" switch allows you to heat or cool the car before you leave.
28+
* **Smart Notifications:**
29+
* **Charging:** Receive alerts when the car is plugged in, when charging starts (with estimated completion time), and when the battery is full.
30+
* **Safety & Maintenance:** The system watches for warning signs like low tire pressure, low brake fluid, or low washer fluid and sends critical alerts to your phone if attention is needed.
3331
<!-- END_DETAILED -->
3432

3533
## Dashboard Connections
@@ -42,36 +40,33 @@ This package powers the following dashboard views:
4240

4341
## Architecture Diagram
4442
<!-- START_MERMAID_DESC -->
45-
The following diagram illustrates the flow from the vehicle API to the user. The `mbapi2020` integration polls the Mercedes Cloud service. The `Car Package` acts as a middle layer, normalizing this raw data into standard sensors (e.g., standardizing window '2' status to 'Closed'). When critical sensors like `low_brake_fluid` trigger, the automation layer evaluates the severity before dispatching either a standard info message or a critical alarm via `notify_smart_master`.
43+
The architecture relies on the `mbapi2020` integration to poll data from the Mercedes Cloud. The `Car` package acts as a transformation layer, converting complex attribute data (like raw status codes for windows and doors) into discrete, easy-to-use binary sensors. This normalized data feeds into a central automation (`notify_car_status_glc`), which evaluates state changes—such as a charging cable connection or a low fluid warning—and routes the appropriate message priority to the user through the `notify_smart_master` script.
4644
<!-- END_MERMAID_DESC -->
4745

4846
<!-- START_MERMAID -->
4947
```mermaid
5048
sequenceDiagram
51-
participant Cloud as Mercedes Cloud
52-
participant API as Integration (mbapi2020)
53-
participant HA as Car Package
54-
participant User as User (Mobile)
55-
56-
Cloud->>API: Poll Status
57-
API->>HA: Update Attributes (Windows/Doors)
58-
HA->>HA: Normalize to Binary Sensors
59-
60-
rect rgb(20, 20, 20)
61-
Note over HA: User Action
62-
User->>HA: Toggle 'Pre-entry AC'
63-
HA->>API: Service Call (preheat_start)
64-
API->>Cloud: Command
49+
participant Mercedes as Mercedes Cloud
50+
participant Integration as HA Integration (mbapi2020)
51+
participant Package as Car Package
52+
participant User as User (Notification)
53+
54+
Note over Arrow: Polling Cycle
55+
Mercedes->>Integration: Vehicle Status Update
56+
Integration->>Package: Update Entity Attributes (Windows, Locks, Odometer)
57+
Package->>Package: Normalize Attributes to Binary Sensors
58+
59+
Note over Package: Automation Logic
60+
alt Critical Warning (e.g., Low Brake Fluid)
61+
Package->>User: 🚨 Critical Alert via script.notify_smart_master
62+
else Standard Event (e.g., Charging Started)
63+
Package->>User: ⚡ Info Notification (Power & Est. Time)
6564
end
66-
67-
rect rgb(50, 20, 20)
68-
Note over HA: Critical Event
69-
API->>HA: Sensor 'Low Brake Fluid' = On
70-
HA->>User: CRITICAL ALERT (Notify Script)
71-
end
72-
73-
API->>HA: Charging Started
74-
HA->>User: Notify "Charging at 11kW" (Est. Time)
65+
66+
Note over User: User Action
67+
User->>Package: Toggle "Pre-entry A/C"
68+
Package->>Integration: Call Service (preheat_start)
69+
Integration->>Mercedes: Send Command
7570
```
7671
<!-- END_MERMAID -->
7772

0 commit comments

Comments
 (0)