#6 UI Updates senden und anzeigen
This commit is contained in:
parent
3c35554740
commit
1cab3457a7
@ -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
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
<div class="sidebar_plugin_mystromswitch">
|
||||
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: mystromswitchEnabled">
|
||||
{{ _('Shutdown Printer after print finishes') }}
|
||||
</label>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user