feat(Thermals): customizable sensor colors#1871
Merged
pedrolamas merged 6 commits intoJun 6, 2026
Merged
Conversation
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds per-sensor color overrides for Thermals, persisting them in UI settings and applying them consistently to the thermal chart and sensor lists (aiming to address #534 / #1866 color issues).
Changes:
- Introduces
uiSettings.dashboard.sensorColorswith Vuex mutations/actions to persist overrides to Moonraker DB. - Updates Thermals UI (targets list + chart series) to read/apply per-sensor overrides via
AppColorPicker. - Refactors
ColorSetto be palette-driven viaglobals.tsand accept an optional override when resolving colors.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/store/printer/getters.ts | Threads sensorColors through heater/output/sensor getters when computing display colors. |
| src/store/config/types.ts | Adds sensorColors to dashboard UI settings typing. |
| src/store/config/state.ts | Initializes sensorColors default state. |
| src/store/config/mutations.ts | Adds mutations to set/remove individual sensor color overrides. |
| src/store/config/actions.ts | Adds actions to persist sensor color overrides to Moonraker DB. |
| src/plugins/colorSet.ts | Refactors palette generation + adds override-aware color resolution. |
| src/main.ts | Updates plugin install call for ColorSetPlugin. |
| src/locales/en.yaml | Adds new i18n labels for “Sensor Color” and “Reset to default”. |
| src/globals.ts | Defines default palettes and palette option types. |
| src/components/widgets/thermals/ThermalChart.vue | Applies overrides when creating chart series colors. |
| src/components/widgets/thermals/TemperatureTargets.vue | Replaces static icons with AppColorPicker controls + dispatches override updates. |
| src/components/ui/AppColorPicker.vue | Adds configurable icon/sizing + resettable UI. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
- add `dbKey` tagged template to split static key segments on `.` while keeping interpolated values intact, so keys like `temperature_sensor my.sensor` aren't misread as nested Moonraker DB paths - `ColorSet.next()` now always returns `string` via a `FALLBACK_COLOR` constant (#2196F3) instead of `undefined` Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
|
Thank you sir! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds per-sensor color overrides for the Thermals widget, resolving two long-standing issues.
Users can now click the color icon next to any sensor, heater, or fan in the Thermals list to pick a custom color. Colors persist across sessions via Moonraker's database and can be reset to the palette default at any time.
Also fixes a pre-existing bug where
notMerge: trueon the chart's update options would blank the chart for ~1 second whenever the theme or viewport changed.Screengrab
Video.mp4
Resolves #534
Resolves #1866