#6 UI Updates senden und anzeigen

This commit is contained in:
David Zingg 2019-11-20 21:36:23 +01:00
parent 76a07016c0
commit e5f0310ab2

View File

@ -54,7 +54,7 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
self._timer.start() self._timer.start()
def _timer_task(self): def _timer_task(self):
self._logger.debug("_timer_task") self._logger.debug("timer_task")
if self.ip is not None: if self.ip is not None:
self._logger.debug("send Request") self._logger.debug("send Request")
try: try:
@ -75,6 +75,10 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
def on_shutdown(self): def on_shutdown(self):
self._logger.info("Hello World!") 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): def on_settings_migrate(self, target, current):
pass pass
@ -88,6 +92,7 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
) )
def on_settings_save(self, data): def on_settings_save(self, data):
self._logger.info("on_settings_save")
octoprint.plugin.SettingsPlugin.on_settings_save(self, data) octoprint.plugin.SettingsPlugin.on_settings_save(self, data)
self.initialize() self.initialize()