Skip to content

Commit

Permalink
feat(Program): do not autoenable using data from TeslaMate
Browse files Browse the repository at this point in the history
  • Loading branch information
pkuehnel committed Nov 16, 2024
1 parent 322226f commit 9d33628
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions TeslaSolarCharger/Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,6 @@ async Task DoStartupStuff(WebApplication webApplication, ILogger<Program> logger
var baseConfigurationService = webApplication.Services.GetRequiredService<IBaseConfigurationService>();
var teslaMateContextWrapper = webApplication.Services.GetRequiredService<ITeslaMateDbContextWrapper>();
var teslaMateContext = teslaMateContextWrapper.GetTeslaMateContextIfAvailable();
//This needs to be done before first base configuration update otherwise all TeslaMate values are removed
if (teslaMateContext != default)
{
baseConfiguration.UseTeslaMateIntegration = true;
baseConfiguration.UseTeslaMateAsDataSource = true;
}
await baseConfigurationService.UpdateBaseConfigurationAsync(baseConfiguration);
if (teslaMateContext != default)
{
try
Expand Down

0 comments on commit 9d33628

Please sign in to comment.