From ccc58f93015e3054617985d12fc7ee438e013d34 Mon Sep 17 00:00:00 2001 From: David Zingg Date: Sun, 1 Dec 2019 10:29:03 +0100 Subject: [PATCH] #16 Codereview Octoprint Plugin Repo --- octoprint_mystromswitch/__init__.py | 7 ++++++- setup.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/octoprint_mystromswitch/__init__.py b/octoprint_mystromswitch/__init__.py index 949ae07..cb3bada 100644 --- a/octoprint_mystromswitch/__init__.py +++ b/octoprint_mystromswitch/__init__.py @@ -197,11 +197,16 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin, ip=None, intervall=1, onOffButtonEnabled=False, - owerOnOnStart=False, + powerOnOnStart=False, powerOffOnShutdown=False, powerOffDelay=0 ) + def get_settings_restricted_paths(self): + return dict(admin=[ + ['ip'] + ]) + def on_settings_save(self, data): self._logger.info("on_settings_save") octoprint.plugin.SettingsPlugin.on_settings_save(self, data) diff --git a/setup.py b/setup.py index a63afc6..55bf1de 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ plugin_package = "octoprint_mystromswitch" plugin_name = "OctoPrint-MyStromSwitch" # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module -plugin_version = "1.0.0" +plugin_version = "1.0.1" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module