Merge pull request #369 from ShagoY/master
Update __init__.py for BME280 for Octoprint (Python3.7)
This commit was merged in pull request #369.
This commit is contained in:
@@ -1131,7 +1131,9 @@ class EnclosurePlugin(octoprint.plugin.StartupPlugin, octoprint.plugin.TemplateP
|
||||
stdout = (Popen(cmd, shell=True, stdout=PIPE).stdout).read()
|
||||
if self._settings.get(["debug_temperature_log"]) is True:
|
||||
self._logger.debug("BME280 result: %s", stdout)
|
||||
|
||||
temp, hum = stdout.decode("utf-8").split("|")
|
||||
|
||||
return (self.to_float(temp.strip()), self.to_float(hum.strip()))
|
||||
except Exception as ex:
|
||||
self._logger.info(
|
||||
|
||||
Reference in New Issue
Block a user