diff --git a/src/octoprint/printer/standard.py b/src/octoprint/printer/standard.py index baf33070b..0a564935c 100644 --- a/src/octoprint/printer/standard.py +++ b/src/octoprint/printer/standard.py @@ -853,6 +853,12 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): if "chamber" in offsets and offsets["chamber"] is not None else 0, } + if self._custom is not None: + for custom_key in self._custom.keys(): + result[custom_key] = { + "actual": self._custom[custom_key][0], + "target": self._custom[custom_key][1], + } return result diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 61cfc4a01..a7614cfa4 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -112,7 +112,7 @@ Groups will be as follows: """ regex_temp = re.compile( - r"(?PB|C|T(?P\d*)):\s*(?P%s)(\s*\/?\s*(?P%s))?" + r"(?PB|C|T(?P\d*)|([\w]+)):\s*(?P%s)(\s*\/?\s*(?P%s))?" % (regex_float_pattern, regex_float_pattern) ) """Regex matching temperature entries in line. @@ -6207,10 +6207,10 @@ def parse_temperature_line(line, current): maxToolNum = toolNumber try: - actual = float(match.group(3)) + actual = float(match.group(4)) target = None - if match.group(4) and match.group(5): - target = float(match.group(5)) + if match.group(4) and match.group(6): + target = float(match.group(6)) result[tool] = (actual, target) except ValueError: