VW ID: fix json error
Some checks failed
Release / call-build-workflow (push) Has been cancelled
Release / Publish Docker :release (push) Has been cancelled
Release / Github & APT (push) Has been cancelled
Release / Hassio Addon (push) Has been cancelled

This commit is contained in:
andig 2022-12-07 10:34:10 +01:00
parent c726a032ef
commit d1ebd7222c

View file

@ -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