Skip to content

Commit

Permalink
Added @appearance variable to supported variables
Browse files Browse the repository at this point in the history
  • Loading branch information
derekantrican committed Oct 8, 2023
1 parent db8f79d commit cb8c021
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
3 changes: 2 additions & 1 deletion octoprint_webhooks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cb8c021

Please sign in to comment.