From cb8c0218e8444c0c475e5145a91c9d298f11f523 Mon Sep 17 00:00:00 2001 From: Derek Antrican Date: Sat, 7 Oct 2023 18:08:08 -0700 Subject: [PATCH] Added @appearance variable to supported variables --- README.md | 8 ++++++++ octoprint_webhooks/__init__.py | 3 ++- setup.py | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e3327d9..e75ee11 100644 --- a/README.md +++ b/README.md @@ -250,6 +250,14 @@ for more information. } ``` +@appearance - a dictionary of the appearance data for your octoprint instance. This reflects the values in OctoPrint Settings > Appearance *(note that default values may not show up in this dictionary)* +``` +{ + "color": "black", + "name": "MyTestName" +} +``` + @currentTime - The time of the event in number of seconds since the epoch. The epoch is usually January 1 1970, 00:00:00 (UTC). diff --git a/octoprint_webhooks/__init__.py b/octoprint_webhooks/__init__.py index 9349861..80c9da3 100644 --- a/octoprint_webhooks/__init__.py +++ b/octoprint_webhooks/__init__.py @@ -613,7 +613,8 @@ def on_event(self, event, payload): "deviceIdentifier": device_identifier, "extra": extra, "currentTime": int(time.time()), - "percentCompleteMilestone": percent_complete_milestone + "percentCompleteMilestone": percent_complete_milestone, + "appearance": self._settings.global_get(["appearance"]) } values.update(values2) diff --git a/setup.py b/setup.py index 21849e1..761f6b2 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ plugin_name = "OctoPrint-Webhooks" # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module -plugin_version = "4.2.0" +plugin_version = "4.2.1" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module