Hi,
Thanks for the work.
I made a modification on my side to get number of minutes instead of ETA.
Not super good at git nor dev so bellow is the modification I made if someone is interested and want to upadate the module.
regards
code update --> MMM-Idf-Transport.js
replace all function --> createDataRow: function (routeObj)
with :
createDataRow: function (routeObj) {
if (isNaN(routeObj.service.ExpectedDepartureTime))
return null;
// Calculate the difference in minutes between current time and departure time
let currentTime = moment();
let departureTime = moment(routeObj.service.ExpectedDepartureTime);
let minutesDifference = departureTime.diff(currentTime, 'minutes');
// Create the row
let row = document.createElement("tr");
let line = document.createElement("td");
line.className = "line";
line.innerHTML = routeObj.route.ID_Line;
if (line.innerHTML)
line.innerHTML = routeObj.route.lineHtml;
row.appendChild(line);
let destination = document.createElement("td");
destination.className = "destination";
destination.innerHTML = this.getDisplayString(routeObj.service.DestinationDisplay[0].value);
row.appendChild(destination);
let departure = document.createElement("td");
departure.className = "departure";
// Display the difference in minutes
departure.innerHTML = `${minutesDifference} min`;
row.appendChild(departure);
return row;