#16 Codereview Octoprint Plugin Repo

This commit is contained in:
David Zingg 2019-12-01 10:29:03 +01:00
parent c56b076620
commit ccc58f9301
2 changed files with 7 additions and 2 deletions

View File

@ -197,11 +197,16 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
ip=None, ip=None,
intervall=1, intervall=1,
onOffButtonEnabled=False, onOffButtonEnabled=False,
owerOnOnStart=False, powerOnOnStart=False,
powerOffOnShutdown=False, powerOffOnShutdown=False,
powerOffDelay=0 powerOffDelay=0
) )
def get_settings_restricted_paths(self):
return dict(admin=[
['ip']
])
def on_settings_save(self, data): def on_settings_save(self, data):
self._logger.info("on_settings_save") self._logger.info("on_settings_save")
octoprint.plugin.SettingsPlugin.on_settings_save(self, data) octoprint.plugin.SettingsPlugin.on_settings_save(self, data)

View File

@ -14,7 +14,7 @@ plugin_package = "octoprint_mystromswitch"
plugin_name = "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 # 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 # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module # module