Skip to content

Commit

Permalink
Merge pull request #1820 from pkuehnel/fix/detectOnlineState
Browse files Browse the repository at this point in the history
feat(TeslaFleetApiService): detect car beeing online
  • Loading branch information
pkuehnel authored Feb 8, 2025
2 parents 51f933e + ed832f5 commit f41f95b
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 f41f95b

Please sign in to comment.