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
Indicates whether the charging cable is connected to the vehicle.Example:
trueIndicates 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:
trueTimestamp when the device state was last updated from the manufacturer’s API.Use this to determine data freshness.Example:
2023-03-22T13:54:34.000ZCharging Power
Current charging rate in Watts.Example:
7400Battery Information
Current battery charge level in percent.Example:
90Range: 0-100Total battery capacity in kilowatt-hours.Example:
79.5Whether the battery has reached the vehicle’s charge limit.Example:
falseEstimated driving range based on the current battery level, in kilometers.Example:
280Current state of a boost charge. Use this to drive the charge now UI — see Setting Preferences for how to trigger a boost.
Example:
| Value | Meaning |
|---|---|
available | A boost can be triggered |
requested | Boost triggered, charge starting |
ongoing | Actively charging via boost |
unavailable | Vehicle full, already charging, or not connected |
availableUsage Examples
Get Vehicle State
Charging States Explained
- Charging
- Connected, Not Charging
- Not Connected
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 rateBest Practices
Data Polling
Data Polling
- 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_atto avoid unnecessary calls - Show last update timestamp to users for transparency
Charge Monitoring
Charge Monitoring
- Highlight when vehicle is waiting for optimal charging time
- Provide context for why charging may be paused
- Use
battery_levelto show charge progress to the user
EV Attributes
Writable parameters and configuration
Dashboard Integration
Building end-user dashboards
