From 1cab3457a7c9625bbb1008df295851f9bedd7b86 Mon Sep 17 00:00:00 2001 From: David Zingg Date: Wed, 20 Nov 2019 21:08:54 +0100 Subject: [PATCH] #6 UI Updates senden und anzeigen --- octoprint_mystromswitch/__init__.py | 10 +++------- .../templates/mystromswitch_sidebar.jinja2 | 5 ++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/octoprint_mystromswitch/__init__.py b/octoprint_mystromswitch/__init__.py index 9d0adbe..7163c63 100644 --- a/octoprint_mystromswitch/__init__.py +++ b/octoprint_mystromswitch/__init__.py @@ -56,8 +56,9 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin, try: request = requests.get( 'http://{}/report'.format(self.ip), timeout=1) - self._plugin_manager.send_plugin_message(self._identifier, - request.json()) + self._logger.debug(request.json()) + #self._plugin_manager.send_plugin_message(self._identifier, + # request.json()) except (requests.exceptions.ConnectionError, ValueError): self._logger.info('Connection Error Host: {}'.format(self.ip)) # Do all Staff here @@ -73,11 +74,6 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin, self._logger.info("on_settings_load") self.initialize() - def on_settings_migrate(self, target, current): - if current >= target: - return - pass - def get_settings_version(self): return 1 diff --git a/octoprint_mystromswitch/templates/mystromswitch_sidebar.jinja2 b/octoprint_mystromswitch/templates/mystromswitch_sidebar.jinja2 index 82da445..d725136 100644 --- a/octoprint_mystromswitch/templates/mystromswitch_sidebar.jinja2 +++ b/octoprint_mystromswitch/templates/mystromswitch_sidebar.jinja2 @@ -1,3 +1,6 @@