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:
trueboolean
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:
truedatetime
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.000ZCharging Power
integer
Current charging rate in Watts.Example:
7400Battery Information
integer
Current battery charge level in percent.Example:
90Range: 0-100float
Total battery capacity in kilowatt-hours.Example:
79.5boolean
Whether the battery has reached the vehicle’s charge limit.Example:
falseinteger
Estimated driving range based on the current battery level, in kilometers.Example:
280enum
Current state of a boost charge. Use this to drive the charge now UI — see Setting Preferences for how to trigger a boost.
Example:
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
