Code refactoring
This commit is contained in:
parent
32550e7374
commit
4c159fbabc
@ -11,7 +11,7 @@ from octoprint.server import user_permission
|
|||||||
from octoprint.util import RepeatedTimer
|
from octoprint.util import RepeatedTimer
|
||||||
|
|
||||||
|
|
||||||
class shutdownprinterPlugin(octoprint.plugin.SettingsPlugin,
|
class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
|
||||||
octoprint.plugin.AssetPlugin,
|
octoprint.plugin.AssetPlugin,
|
||||||
octoprint.plugin.TemplatePlugin,
|
octoprint.plugin.TemplatePlugin,
|
||||||
octoprint.plugin.SimpleApiPlugin,
|
octoprint.plugin.SimpleApiPlugin,
|
||||||
@ -128,7 +128,7 @@ class shutdownprinterPlugin(octoprint.plugin.SettingsPlugin,
|
|||||||
|
|
||||||
def get_template_configs(self):
|
def get_template_configs(self):
|
||||||
return [dict(type="sidebar",
|
return [dict(type="sidebar",
|
||||||
name="Shutdown Printer",
|
name="MyStrom Switch",
|
||||||
custom_bindings=False,
|
custom_bindings=False,
|
||||||
icon="power-off"),
|
icon="power-off"),
|
||||||
dict(type="settings", custom_bindings=False)]
|
dict(type="settings", custom_bindings=False)]
|
||||||
@ -423,7 +423,7 @@ class shutdownprinterPlugin(octoprint.plugin.SettingsPlugin,
|
|||||||
current=self._plugin_version,
|
current=self._plugin_version,
|
||||||
|
|
||||||
# update method: pip w/ dependency links
|
# 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__():
|
def __plugin_load__():
|
||||||
global __plugin_implementation__
|
global __plugin_implementation__
|
||||||
__plugin_implementation__ = shutdownprinterPlugin()
|
__plugin_implementation__ = MyStromSwitchPlugin()
|
||||||
|
|
||||||
global __plugin_hooks__
|
global __plugin_hooks__
|
||||||
__plugin_hooks__ = {
|
__plugin_hooks__ = {
|
||||||
|
2
setup.py
2
setup.py
@ -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.7"
|
plugin_version = "0.1.0"
|
||||||
|
|
||||||
# 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
|
||||||
|
Loading…
Reference in New Issue
Block a user