44namespace Tesla . NET . Models
55{
66 using System ;
7- using System . ComponentModel ;
87 using System . Diagnostics ;
98 using System . Globalization ;
109 using Newtonsoft . Json ;
@@ -87,17 +86,17 @@ public ChargeState(
8786 long ? chargeRate = null ,
8887 bool ? chargePortDoorOpen = null ,
8988 string connChargeCable = null ,
90- string scheduledChargingStartTime = null ,
89+ long ? scheduledChargingStartTime = null ,
9190 bool ? scheduledChargingPending = null ,
92- string userChargeEnableRequest = null ,
91+ bool ? userChargeEnableRequest = null ,
9392 bool ? chargeEnableRequest = null ,
9493 int ? chargerPhases = null ,
9594 string chargePortLatch = null ,
9695 long ? chargeCurrentRequest = null ,
9796 long ? chargeCurrentRequestMax = null ,
9897 bool ? managedChargingActive = null ,
9998 bool ? managedChargingUserCanceled = null ,
100- string managedChargingStartTime = null ,
99+ long ? managedChargingStartTime = null ,
101100 bool ? batteryHeaterOn = null ,
102101 bool ? notEnoughPowerToHeat = null ,
103102 long timestamp = 0 )
@@ -311,7 +310,13 @@ public ChargeState(
311310 /// Gets the schedule charging start time of a <see cref="Vehicle"/>.
312311 /// </summary>
313312 [ JsonProperty ( "scheduled_charging_start_time" ) ]
314- public string ScheduledChargingStartTime { get ; }
313+ public long ? ScheduledChargingStartTime { get ; }
314+
315+ /// <summary>
316+ /// Gets the UTC <see cref="DateTime"/> of the schedule charging start time of a <see cref="Vehicle"/>.
317+ /// </summary>
318+ [ JsonIgnore ]
319+ public DateTime ? ScheduledChargingStartTimeUtc => EpochConversion . FromSeconds ( ScheduledChargingStartTime ) ;
315320
316321 /// <summary>
317322 /// Gets a value indicating whether scheduled charging is pending for a <see cref="Vehicle"/>.
@@ -323,7 +328,7 @@ public ChargeState(
323328 /// Gets a value indicating whether a user charge enable request has been made for a <see cref="Vehicle"/>.
324329 /// </summary>
325330 [ JsonProperty ( "user_charge_enable_request" ) ]
326- public string UserChargeEnableRequest { get ; }
331+ public bool ? UserChargeEnableRequest { get ; }
327332
328333 /// <summary>
329334 /// Gets a value indicating whether a charge enable request has been made for a <see cref="Vehicle"/>.
@@ -371,7 +376,13 @@ public ChargeState(
371376 /// Gets the managed charging start time of a <see cref="Vehicle"/>.
372377 /// </summary>
373378 [ JsonProperty ( "managed_charging_start_time" ) ]
374- public string ManagedChargingStartTime { get ; }
379+ public long ? ManagedChargingStartTime { get ; }
380+
381+ /// <summary>
382+ /// Gets the UTC <see cref="DateTime"/> of the managed charging start time of a <see cref="Vehicle"/>.
383+ /// </summary>
384+ [ JsonIgnore ]
385+ public DateTime ? ManagedChargingStartTimeUtc => EpochConversion . FromSeconds ( ManagedChargingStartTime ) ;
375386
376387 /// <summary>
377388 /// Gets a value indicating whether battery heating is on for a <see cref="Vehicle"/>.
0 commit comments