@@ -31,15 +31,15 @@ public class ChargeState {
31
31
public let chargerVoltage : Int
32
32
public let chargingState : ChargingState
33
33
public let estBatteryRange : Double
34
- public let euVehicle : Bool
34
+ public let euVehicle : Bool ?
35
35
public let fastChargerPresent : Bool
36
36
public let fastChargerType : String ?
37
37
public let idealBatteryRange : Double
38
38
public let managedChargingActive : Bool
39
39
public let managedChargingStartTime : Date ?
40
40
public let managedChargingUserCanceled : Bool
41
41
public let maxRangeChargeCounter : Int
42
- public let motorizedChargePort : Bool
42
+ public let motorizedChargePort : Bool ?
43
43
public let notEnoughPowerToHeat : Bool ?
44
44
public let scheduledChargingPending : Bool
45
45
public let scheduledChargingStartTime : Date ?
@@ -74,7 +74,7 @@ public class ChargeState {
74
74
chargerVoltage = dictionary [ " charger_voltage " ] as! Int
75
75
chargingState = ChargingState ( rawValue: dictionary [ " charging_state " ] as! String ) !
76
76
estBatteryRange = dictionary [ " est_battery_range " ] as! Double
77
- euVehicle = dictionary [ " eu_vehicle " ] as! Bool
77
+ euVehicle = dictionary [ " eu_vehicle " ] as? Bool
78
78
fastChargerPresent = dictionary [ " fast_charger_present " ] as! Bool
79
79
fastChargerType = dictionary [ " fast_charger_type " ] as? String
80
80
idealBatteryRange = dictionary [ " ideal_battery_range " ] as! Double
@@ -86,7 +86,7 @@ public class ChargeState {
86
86
}
87
87
managedChargingUserCanceled = dictionary [ " managed_charging_user_canceled " ] as! Bool
88
88
maxRangeChargeCounter = dictionary [ " max_range_charge_counter " ] as! Int
89
- motorizedChargePort = dictionary [ " motorized_charge_port " ] as! Bool
89
+ motorizedChargePort = dictionary [ " motorized_charge_port " ] as? Bool
90
90
notEnoughPowerToHeat = dictionary [ " not_enough_power_to_heat " ] as? Bool
91
91
scheduledChargingPending = dictionary [ " scheduled_charging_pending " ] as! Bool
92
92
if let timestamp = dictionary [ " scheduled_charging_start_time " ] as? Double {
0 commit comments