From e5f0310ab2522c9852eb1fac5d4d097fa21f3ede Mon Sep 17 00:00:00 2001 From: David Zingg Date: Wed, 20 Nov 2019 21:36:23 +0100 Subject: [PATCH] #6 UI Updates senden und anzeigen --- octoprint_mystromswitch/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/octoprint_mystromswitch/__init__.py b/octoprint_mystromswitch/__init__.py index 2039786..8b10fa8 100644 --- a/octoprint_mystromswitch/__init__.py +++ b/octoprint_mystromswitch/__init__.py @@ -54,7 +54,7 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin, self._timer.start() def _timer_task(self): - self._logger.debug("_timer_task") + self._logger.debug("timer_task") if self.ip is not None: self._logger.debug("send Request") try: @@ -75,6 +75,10 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin, def on_shutdown(self): self._logger.info("Hello World!") + def on_settings_initialized(self): + self._logger.info("on_settings_initialized") + self.initialize() + def on_settings_migrate(self, target, current): pass @@ -88,6 +92,7 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin, ) def on_settings_save(self, data): + self._logger.info("on_settings_save") octoprint.plugin.SettingsPlugin.on_settings_save(self, data) self.initialize()