VW ID: fix json error
This commit is contained in:
parent
c726a032ef
commit
d1ebd7222c
1 changed files with 2 additions and 77 deletions
|
|
@ -65,8 +65,8 @@ type Status struct {
|
|||
RemainingChargingTimeToCompleteMin int `json:"remainingChargingTimeToComplete_min"`
|
||||
ChargingState string `json:"chargingState"` // readyForCharging/off
|
||||
ChargeMode string `json:"chargeMode"` // invalid
|
||||
ChargePowerKW int `json:"chargePower_kW"`
|
||||
ChargeRateKmph int `json:"chargeRate_kmph"`
|
||||
ChargePowerKW float64 `json:"chargePower_kW"`
|
||||
ChargeRateKmph float64 `json:"chargeRate_kmph"`
|
||||
ChargeType string `json:"chargeType"`
|
||||
ChargingSettings string `json:"chargingSettings"`
|
||||
} `json:"value"`
|
||||
|
|
@ -194,81 +194,6 @@ type Status struct {
|
|||
} `json:"chargingProfiles"`
|
||||
}
|
||||
|
||||
// BatteryStatus is the /status.batteryStatus api
|
||||
type BatteryStatus struct {
|
||||
CarCapturedTimestamp Timestamp
|
||||
CurrentSOCPercent int `json:"currentSOC_pct"`
|
||||
CruisingRangeElectricKm int `json:"cruisingRangeElectric_km"`
|
||||
}
|
||||
|
||||
// ChargingStatus is the /status.chargingStatus api
|
||||
type ChargingStatus struct {
|
||||
CarCapturedTimestamp Timestamp
|
||||
ChargingState string // readyForCharging/off
|
||||
ChargeMode string // invalid
|
||||
RemainingChargingTimeToCompleteMin int `json:"remainingChargingTimeToComplete_min"`
|
||||
ChargePowerKW float64 `json:"chargePower_kW"`
|
||||
ChargeRateKmph float64 `json:"chargeRate_kmph"`
|
||||
}
|
||||
|
||||
// ChargingSettings is the /status.chargingSettings api
|
||||
type ChargingSettings struct {
|
||||
CarCapturedTimestamp Timestamp
|
||||
MaxChargeCurrentAC string // reduced, maximum
|
||||
AutoUnlockPlugWhenCharged string
|
||||
TargetSOCPercent int `json:"targetSOC_pct"`
|
||||
}
|
||||
|
||||
// PlugStatus is the /status.plugStatus api
|
||||
type PlugStatus struct {
|
||||
CarCapturedTimestamp Timestamp
|
||||
PlugConnectionState string // connected, disconnected
|
||||
PlugLockState string // locked, unlocked
|
||||
}
|
||||
|
||||
// ClimatisationStatus is the /status.climatisationStatus api
|
||||
type ClimatisationStatus struct {
|
||||
CarCapturedTimestamp Timestamp
|
||||
RemainingClimatisationTimeMin int `json:"remainingClimatisationTime_min"`
|
||||
ClimatisationState string // off
|
||||
}
|
||||
|
||||
// ClimatisationSettings is the /status.climatisationSettings api
|
||||
type ClimatisationSettings struct {
|
||||
CarCapturedTimestamp Timestamp
|
||||
TargetTemperatureK float64 `json:"targetTemperature_K"`
|
||||
TargetTemperatureC float64 `json:"targetTemperature_C"`
|
||||
ClimatisationWithoutExternalPower bool
|
||||
ClimatisationAtUnlock bool // ClimatizationAtUnlock?
|
||||
WindowHeatingEnabled bool
|
||||
ZoneFrontLeftEnabled bool
|
||||
ZoneFrontRightEnabled bool
|
||||
ZoneRearLeftEnabled bool
|
||||
ZoneRearRightEnabled bool
|
||||
}
|
||||
|
||||
// RangeStatus is the /status.rangeStatus api
|
||||
type RangeStatus struct {
|
||||
CarCapturedTimestamp Timestamp
|
||||
CarType string
|
||||
PrimaryEngine struct {
|
||||
Type string
|
||||
CurrentSOCPercent int `json:"currentSOC_pct"`
|
||||
RemainingRangeKm int `json:"remainingRange_km"`
|
||||
}
|
||||
TotalRangeKm int `json:"totalRange_km"`
|
||||
}
|
||||
|
||||
// MaintenanceStatus is the /status.maintenanceStatus api
|
||||
type MaintenanceStatus struct {
|
||||
CarCapturedTimestamp Timestamp // "2021-09-04T14:59:10Z",
|
||||
InspectionDueDays int `json:"inspectionDue_days"`
|
||||
InspectionDueKm int `json:"inspectionDue_km"`
|
||||
MileageKm int `json:"mileage_km"`
|
||||
OilServiceDueDays int `json:"oilServiceDue_days"`
|
||||
OilServiceDueKm int `json:"oilServiceDue_km"`
|
||||
}
|
||||
|
||||
// Timestamp implements JSON unmarshal
|
||||
type Timestamp struct {
|
||||
time.Time
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue