Skip to content

Commit

Permalink
Merge pull request #1082 from pkuehnel/fix/fleetApiUpdateLastSetAmp
Browse files Browse the repository at this point in the history
fix(TeslaFleetApiService): update last set amp on fleet Api service
  • Loading branch information
pkuehnel authored Jan 20, 2024
2 parents 1143a8f + e24b4df commit 8bbe05e
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 @@ -116,6 +116,10 @@ public async Task SetAmp(int carId, int amps)
var vin = await GetVinByCarId(carId).ConfigureAwait(false);
var commandData = $"{{\"charging_amps\":{amps}}}";
var result = await SendCommandToTeslaApi<DtoVehicleCommandResult>(vin, SetChargingAmpsRequest, commandData).ConfigureAwait(false);
if (result?.Response?.Result == true)
{
car.CarState.LastSetAmp = amps;
}
}

public async Task SetScheduledCharging(int carId, DateTimeOffset? chargingStartTime)
Expand Down

0 comments on commit 8bbe05e

Please sign in to comment.