Skip to content

Commit

Permalink
feat(TeslaFleetApiService): detect car beeing online
Browse files Browse the repository at this point in the history
  • Loading branch information
pkuehnel committed Feb 8, 2025
1 parent 51f933e commit ed832f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions TeslaSolarCharger/Server/Services/TeslaFleetApiService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,10 @@ private async Task RefreshVehicleOnlineState(DtoCar car)
else
{
carStateLog.BooleanValue = false;
if (car.State == CarStateEnum.Asleep || car.State == CarStateEnum.Offline)
{
car.State = CarStateEnum.Online;
}
}
teslaSolarChargerContext.CarValueLogs.Add(carStateLog);
await teslaSolarChargerContext.SaveChangesAsync().ConfigureAwait(false);
Expand Down

0 comments on commit ed832f5

Please sign in to comment.