From 2be05d4f9aa8643ab5608e8b902a29aeb832e3ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sun, 9 Mar 2014 13:43:59 +0100 Subject: [PATCH] Do not try to send bed temp on API if not available --- src/octoprint/printer.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/octoprint/printer.py b/src/octoprint/printer.py index b7948d58..f992b78d 100644 --- a/src/octoprint/printer.py +++ b/src/octoprint/printer.py @@ -613,11 +613,12 @@ class Printer(): "target": self._temp[tool][1], "offset": tempOffset[tool] if tool in tempOffset.keys() and tempOffset[tool] is not None else 0 } - result["bed"] = { - "actual": self._bedTemp[0], - "target": self._bedTemp[1], - "offset": bedTempOffset - } + if self._bedTemp is not None: + result["bed"] = { + "actual": self._bedTemp[0], + "target": self._bedTemp[1], + "offset": bedTempOffset + } return result