# coding=utf-8 from __future__ import absolute_import import octoprint.plugin class OctoSwitcherPlugin(octoprint.plugin.StartupPlugin, octoprint.plugin.TemplatePlugin, octoprint.plugin.SettingsPlugin): def on_after_startup(self): self._logger.info("Switcher settings: %s" % self._settings.get(["switch0"])) def get_settings_defaults(self): return dict(switch0='light') def get_template_vars(self): return dict(switch0=self._settings.get(["switch0"])) __plugin_name__ = 'Switcher' __plugin_implementation__ = OctoSwitcherPlugin()