entrippy / OctoPrint-OctoHue

Illuminate your print job and signal its status using a Philips Hue lights.
GNU Affero General Public License v3.0
18 stars 4 forks source link

Togglehue and customisable statuses #22

Closed entrippy closed 4 years ago

entrippy commented 4 years ago

Added features:

User Configurable Statuses Re-worked Status configuration to allow complete user customisability. Previously I stored a seperate settings key to hold each statuses colour and brightness, triggered against a predetermined set of statuses. Now the settings contains statusDict, whose keys match the statuses the users is interested in, the value of which is a nested dict containing colour, brightness, and if the light should be extinguished.

To avoid some quirks of Octoprints settings persistence, if no statuses are defined in statusDict, the default statuses in statusDict are bootstrapped into settings on plugin start so that they are then persisted to yaml.