NAME_1 dieses programm besser gemacht werden? : var hourFormat = function(seconds) {
  var hours = Math.floor(seconds / 3600);
  var minutes = (seconds % 3600) / 60;
  return hours + "h " + minutes + "m";
};

if (msg.payload[0] == 0) {
  msg1 = {
    topic: "BatHour",
    payload: "Empty"
  };
  msg2 = {
    topic: "BatMin",
    payload: ""
  };
} else {
  var temp = (6400 * msg.payload[1]) / 100 / msg.payload[0];
  var decimH = Math.floor(temp);
  var decimM = temp % 1 ? Math.round(temp % 1) * 60 : 0;
  msg1 = {
    topic: "BatHour",
    payload: decimH + "h " + hourFormat(decimM)
  };
  msg2 = {
    topic: "BatMin",
    payload: hourFormat(decimM)
  };
}

return [[msg1, msg2]];
