Skip to content

Commit

Permalink
Merge pull request #1810 from pkuehnel/fix/doNotTryToConnectToNotEnab…
Browse files Browse the repository at this point in the history
…ledCarsBle

fix(TeslaBleService): only check ble container on enabled cars
  • Loading branch information
pkuehnel authored Feb 6, 2025
2 parents ac54572 + 228c949 commit 0327e36
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions TeslaSolarCharger/Server/Services/TeslaBleService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,11 @@ public async Task CheckBleApiVersionCompatibilities()
}
var url = baseUrl + "Hello/TscVersionCompatibility";
using var client = new HttpClient();
client.Timeout = TimeSpan.FromSeconds(3);
var vins = settings.Cars.Where(c => c.BleApiBaseUrl == host && c.UseBle).Select(c => c.Vin).ToList();
client.Timeout = TimeSpan.FromSeconds(5);
var vins = settings.Cars
.Where(c => c.BleApiBaseUrl == host && c.UseBle && (c.ShouldBeManaged == true))
.Select(c => c.Vin)
.ToList();
try
{
var response = await client.GetAsync(url).ConfigureAwait(false);
Expand Down

0 comments on commit 0327e36

Please sign in to comment.