From 4c159fbabc619e0ac21db4c9d854f71d7bbfc4a7 Mon Sep 17 00:00:00 2001 From: David Zingg Date: Tue, 19 Nov 2019 21:46:26 +0100 Subject: [PATCH] Code refactoring --- octoprint_mystromswitch/__init__.py | 8 ++++---- setup.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/octoprint_mystromswitch/__init__.py b/octoprint_mystromswitch/__init__.py index 59e8959..d24986b 100644 --- a/octoprint_mystromswitch/__init__.py +++ b/octoprint_mystromswitch/__init__.py @@ -11,7 +11,7 @@ from octoprint.server import user_permission from octoprint.util import RepeatedTimer -class shutdownprinterPlugin(octoprint.plugin.SettingsPlugin, +class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin, octoprint.plugin.AssetPlugin, octoprint.plugin.TemplatePlugin, octoprint.plugin.SimpleApiPlugin, @@ -128,7 +128,7 @@ class shutdownprinterPlugin(octoprint.plugin.SettingsPlugin, def get_template_configs(self): return [dict(type="sidebar", - name="Shutdown Printer", + name="MyStrom Switch", custom_bindings=False, icon="power-off"), dict(type="settings", custom_bindings=False)] @@ -423,7 +423,7 @@ class shutdownprinterPlugin(octoprint.plugin.SettingsPlugin, current=self._plugin_version, # update method: pip w/ dependency links - pip="https://github.com/da4id/OctoPrint-MyStromSwitch/archive/master.zip" + pip="https://github.com/da4id/OctoPrint-MyStromSwitch/archive/{target_version}.zip" ) ) @@ -433,7 +433,7 @@ __plugin_name__ = "OctoPrint-MyStromSwitch" def __plugin_load__(): global __plugin_implementation__ - __plugin_implementation__ = shutdownprinterPlugin() + __plugin_implementation__ = MyStromSwitchPlugin() global __plugin_hooks__ __plugin_hooks__ = { diff --git a/setup.py b/setup.py index 537e474..bf504ce 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.7" +plugin_version = "0.1.0" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module