evcc-io/vehicle/skoda/types.go
Michael Heß 9ff704e763
Some checks failed
Release / Hassio Addon (push) Has been cancelled
Release / call-build-workflow (push) Has been cancelled
Release / Publish Docker :release (push) Has been cancelled
Release / Github & APT (push) Has been cancelled
Release / Demo (push) Has been cancelled
Move MySkoda implementation into own package (#14349)
2024-06-13 22:10:07 +02:00

71 lines
1.7 KiB
Go

package skoda
// VehiclesResponse is the /v3/garage api
type VehiclesResponse struct {
Vehicles []Vehicle
}
type Vehicle struct {
ID, VIN string
Name string // user-given name
LastUpdatedAt string
Specification Specification
// Connectivities
// Capabilities
}
type Specification struct {
Title string
Model string
ModelYear string
Body string
SystemCode string
SystemModelId string
Engine struct {
Typ string `json:"type"`
PowerInKW int
}
Battery struct {
CapacityInKWh int
}
Gearbox struct {
Typ string `json:"type"`
}
TrimLevel string
ManufacturingDate string
MaxChargingPowerInKW int
}
// StatusResponse is the /v2/vehicle-status/<vin> api
type StatusResponse struct {
Remote struct {
MileageInKm float64
}
}
// ChargerResponse is the /v1/charging/<vin>/status api
type ChargerResponse struct {
Plug struct {
ConnectionState string // Connected
LockState string // Unlocked
}
Charging struct {
State string // Error
RemainingToCompleteInSeconds int64
ChargingPowerInWatts float64
ChargingRateInKilometersPerHour float64
ChargingType string // Invalid
ChargeMode string // MANUAL
}
Battery struct {
CruisingRangeElectricInMeters int64
StateOfChargeInPercent int
}
}
// SettingsResponse is the /v1/charging/<vin>/settings api
type SettingsResponse struct {
AutoUnlockPlugWhenCharged string `json:"autoUnlockPlugWhenCharged"`
MaxChargeCurrentAc string `json:"maxChargeCurrentAc"`
TargetStateOfChargeInPercent int `json:"targetStateOfChargeInPercent"`
}