Nice, lightweight Home Assistant integration that connects to the OpenCARWINGS API to expose your Nissan (or compatible) cars as devices in Home Assistant.
This is my first integration for HA. If you find it useful I'd really appreciate if you buy me a coffe:
Per car the integration currently exposes:
- Sensors
- Range (A/C on / A/C off)
- Charge cable plugged in (plugged / unplugged)
- High-level status (charging / running / ac_on / idle)
- Per-car "Last Updated" (diagnostic): reports the ISO 8601 timestamp of the last direct reading from the car. The sensor is created per VIN, shows the most recent timestamp found in
ev_info.last_updated,location.last_updated, orlast_connection, and has the unique id patternha_opencarwings_last_updated_<VIN>. - Per-car "Last Requested" (diagnostic): reports the last time the integration requested data from the API (coordinator's last update time). The sensor is created per VIN and has the unique id pattern
ha_opencarwings_last_requested_<VIN>. - A top-level
OpenCARWINGS Carssensor listing your cars and VINs
- Device tracker: car GPS (uses
last_location/locationreturned by the API). The tracker entity is attached to the same car device as the per-car buttons and shares the car VIN as the device identifier; the tracker entity itself keeps a stableunique_idof the formha_opencarwings_tracker_<VIN>. The visible name prefers the car'snicknameif present, otherwise it falls back tomodel_name(for example, "MyCar Tracker"). - Switch: A/C control (on/off) — sends commands to the car via the OpenCARWINGS command endpoint
- Button: Manual refresh — a per-integration button is available to force an immediate refresh from the OpenCARWINGS service (unique id:
ha_opencarwings_refresh_<entry_id>). - Button: Per-car "Request refresh" — each car has a per-vehicle button labeled like
Request data refresh for <nickname|model>(for example, "Request data refresh for MyCar"). Pressing it sends a "Refresh data" command to OpenCARWINGS (unique id:ha_opencarwings_car_refresh_<VIN>).
The per-car Last Updated sensors are marked as diagnostic (they're metadata, not a regularly changing state) and are typically not recorded by Home Assistant's Recorder. If you want to ensure these sensors are excluded from history/recorder, add an exclusion to your configuration.yaml:
recorder:
exclude:
entity_globs:
- "sensor.ha_opencarwings_last_updated_*"
- "sensor.ha_opencarwings_last_requested_*"This will prevent per-car Last Updated sensors from being stored in your database and showing up in history charts.
A few helpful naming/ID patterns to identify entities created by the integration:
- Device tracker name: uses
nicknamewhen available, otherwisemodel_name. Visible name example:MyCar Tracker. - Tracker unique_id:
ha_opencarwings_tracker_<VIN> - Tracker device identifier:
tracker_<VIN>(the tracker appears as a separate device; the entity unique id above still applies) - Per-car "Last Updated" sensor:
ha_opencarwings_last_updated_<VIN> - Car refresh button label:
Request data refresh for <nickname|model>(visible name) — unique id:ha_opencarwings_car_refresh_<VIN> - A/C switch:
ha_opencarwings_ac_<VIN>
These stable IDs are useful when excluding entities from the recorder or when writing automations targeting specific cars.
These entities are created per-VIN and appear as devices in the Integrations UI.
Choose one of the options below:
- HACS (recommended)
- In HACS: Integrations → three dots → Custom repositories → Add this repository as category "Integration" → Install → Restart Home Assistant
- Manual
- Copy the
custom_components/ha_opencarwingsdirectory into<config>/custom_components/on your Home Assistant host - Restart Home Assistant
- Go to Settings → Devices & Services → Add Integration → search for OpenCARWINGS and follow the setup flow
- Copy the
Setup is done via the UI. You will need:
- Username and Password for your OpenCARWINGS account
- Scan interval (polling frequency, default: 15 minutes). The setup and options flows present a friendly select with labeled choices (for example: "1 minute", "15 minutes (default)", "1 hour", "1 day").
- API base URL (optional — defaults to the known OpenCARWINGS endpoint)
The integration obtains JWT tokens (access & refresh) during setup and refreshes tokens automatically.
- Run tests with:
pytest - The repository includes Home Assistant test stubs under
tests/stubs/to make running unit tests easier.
Found a bug or want a feature? Please open an issue or a PR at: https://github.com/czapeczek/ha_opencarwings
Contributions, fixes and improvements are welcome!
A big thank you to the OpenCARWINGS project for providing the reverse-engineered API that makes this integration possible: https://github.com/developerfromjokela/opencarwings
