diff --git a/TeslaSolarCharger/Server/Services/FleetTelemetryWebSocketService.cs b/TeslaSolarCharger/Server/Services/FleetTelemetryWebSocketService.cs index 30d598c79..d3ce34c8f 100644 --- a/TeslaSolarCharger/Server/Services/FleetTelemetryWebSocketService.cs +++ b/TeslaSolarCharger/Server/Services/FleetTelemetryWebSocketService.cs @@ -314,7 +314,8 @@ private async Task ReceiveMessages(DtoFleetTelemetryWebSocketClients client, str if (!IsCarValueLogTooOld(settingsCar, carValueLog, message.Type)) { if (carValueLog.BooleanValue == true - && (settingsCar.State != CarStateEnum.Asleep && settingsCar.State != CarStateEnum.Offline)) + //Do only overwrite these states as otherwise Charging or Driving might be overwritten + && settingsCar.State is CarStateEnum.Unknown or CarStateEnum.Suspended) { settingsCar.State = CarStateEnum.Offline; _propertyUpdateTimestamps[(settingsCar.Id, message.Type)] = carValueLog.Timestamp;