Skip to main content

Electric Vehicle State

Electric vehicle state parameters provide real-time charging status and battery information. These fields are read-only and automatically updated from the manufacturer’s API.
State data is sourced from Smartcar webhooks and updates whenever the vehicle reports a change.

Charging Status

boolean
Indicates whether the charging cable is connected to the vehicle.Example: true
boolean
Indicates whether charging is currently in progress.A vehicle can be plugged in but not actively charging (waiting for low-price period, charge limit reached, etc.).Example: true
datetime
Timestamp when the device state was last updated from the manufacturer’s API.Use this to determine data freshness.Example: 2023-03-22T13:54:34.000Z

Charging Power

integer
Current charging rate in Watts.Example: 7400

Battery Information

integer
Current battery charge level in percent.Example: 90Range: 0-100
float
Total battery capacity in kilowatt-hours.Example: 79.5
boolean
Whether the battery has reached the vehicle’s charge limit.Example: false
integer
Estimated driving range based on the current battery level, in kilometers.Example: 280
enum
Current state of a boost charge. Use this to drive the charge now UI — see Setting Preferences for how to trigger a boost.Example: available

Usage Examples

Get Vehicle State

Charging States Explained

Conditions: is_plugged_in: true, is_charging: trueVehicle is actively drawing power and charging the battery.Typical Duration: 1-8 hours depending on battery size and charge rate

Best Practices

  • Poll vehicle state every 5-10 minutes when plugged in
  • Reduce polling to 15-30 minutes when not plugged in
  • Check charge_state_last_updated_at to avoid unnecessary calls
  • Show last update timestamp to users for transparency
  • Highlight when vehicle is waiting for optimal charging time
  • Provide context for why charging may be paused
  • Use battery_level to show charge progress to the user

EV Attributes

Writable parameters and configuration

Dashboard Integration

Building end-user dashboards