Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertMN committed Mar 4, 2021
2 parents 7442004 + 53c2157 commit c5917ec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions octoprint_simplyfilamentsensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ def register_custom_events(*args, **kwargs):
"filament_loaded"
]

# Plugin helpers
def get_state(self):
return {"has_filament": not self.no_filament()}


__plugin_pythoncompat__ = ">=2.7,<4" # python 2 and 3

Expand All @@ -403,3 +407,8 @@ def __plugin_load__():
"octoprint.plugin.softwareupdate.check_config": __plugin_implementation__.get_update_information,
"octoprint.events.register_custom_events": __plugin_implementation__.register_custom_events,
}

global __plugin_helpers__
__plugin_helpers__ = {
"get_status": __plugin_implementation__.get_state
}

0 comments on commit c5917ec

Please sign in to comment.