forked from evcc-io/evcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
44 lines (40 loc) · 1.17 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package skoda
// VehiclesResponse is the /v2/garage/vehicles api
type VehiclesResponse []Vehicle
type Vehicle struct {
ID, VIN string
LastUpdatedAt string
Specification struct {
Title, Brand, Model string
Battery struct {
CapacityInKWh int
}
}
// Connectivities
// Capabilities
}
// 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"`
}