@@ -31,15 +31,15 @@ public class ChargeState {
3131 public let chargerVoltage : Int
3232 public let chargingState : ChargingState
3333 public let estBatteryRange : Double
34- public let euVehicle : Bool
34+ public let euVehicle : Bool ?
3535 public let fastChargerPresent : Bool
3636 public let fastChargerType : String ?
3737 public let idealBatteryRange : Double
3838 public let managedChargingActive : Bool
3939 public let managedChargingStartTime : Date ?
4040 public let managedChargingUserCanceled : Bool
4141 public let maxRangeChargeCounter : Int
42- public let motorizedChargePort : Bool
42+ public let motorizedChargePort : Bool ?
4343 public let notEnoughPowerToHeat : Bool ?
4444 public let scheduledChargingPending : Bool
4545 public let scheduledChargingStartTime : Date ?
@@ -74,7 +74,7 @@ public class ChargeState {
7474 chargerVoltage = dictionary [ " charger_voltage " ] as! Int
7575 chargingState = ChargingState ( rawValue: dictionary [ " charging_state " ] as! String ) !
7676 estBatteryRange = dictionary [ " est_battery_range " ] as! Double
77- euVehicle = dictionary [ " eu_vehicle " ] as! Bool
77+ euVehicle = dictionary [ " eu_vehicle " ] as? Bool
7878 fastChargerPresent = dictionary [ " fast_charger_present " ] as! Bool
7979 fastChargerType = dictionary [ " fast_charger_type " ] as? String
8080 idealBatteryRange = dictionary [ " ideal_battery_range " ] as! Double
@@ -86,7 +86,7 @@ public class ChargeState {
8686 }
8787 managedChargingUserCanceled = dictionary [ " managed_charging_user_canceled " ] as! Bool
8888 maxRangeChargeCounter = dictionary [ " max_range_charge_counter " ] as! Int
89- motorizedChargePort = dictionary [ " motorized_charge_port " ] as! Bool
89+ motorizedChargePort = dictionary [ " motorized_charge_port " ] as? Bool
9090 notEnoughPowerToHeat = dictionary [ " not_enough_power_to_heat " ] as? Bool
9191 scheduledChargingPending = dictionary [ " scheduled_charging_pending " ] as! Bool
9292 if let timestamp = dictionary [ " scheduled_charging_start_time " ] as? Double {
0 commit comments