diff --git a/backend/api/EventHandlers/MqttEventHandler.cs b/backend/api/EventHandlers/MqttEventHandler.cs index 7bd4c5f90..fbabd3237 100644 --- a/backend/api/EventHandlers/MqttEventHandler.cs +++ b/backend/api/EventHandlers/MqttEventHandler.cs @@ -81,8 +81,8 @@ private async void OnIsarStatus(object? sender, MqttReceivedArgs mqttArgs) if (robot.Status == isarStatus.Status) { return; } - await robotService.UpdateRobotStatus(robot.Id, isarStatus.Status); - _logger.LogInformation("Updated status for robot {Name} to {Status}", robot.Name, isarStatus.Status); + var updatedRobot = await robotService.UpdateRobotStatus(robot.Id, isarStatus.Status); + _logger.LogInformation("Updated status for robot {Name} to {Status}", updatedRobot.Name, updatedRobot.Status); if (isarStatus.Status == RobotStatus.Available) missionSchedulingService.TriggerRobotAvailable(new RobotAvailableEventArgs(robot.Id)); else if (isarStatus.Status == RobotStatus.Offline) await robotService.UpdateCurrentArea(robot.Id, null);