Repository navigation
fix(children): save each child's colour and let it be changed (#1078) - #1080
Merged
tempus2016 merged 1 commit intoOct 15, 2026
Merged
Conversation
The setup wizard asked for a colour per child but never sent it, and the
Children dialog had no colour field, so the panel always coloured children
by their place in the list.
- Child gains a `color` ("#rrggbb", or "" for the automatic palette colour),
strictly validated on add_child, update_child and setup_wizard/apply.
- The wizard sends the colour it shows; the Edit child dialog gets an
Automatic + swatch picker.
- The panel uses the stored colour wherever it colours a child (Today,
child picker, Children tab avatar), falling back to the old palette.
- New strings translated in every locale.
tempus2016
deleted the
fix/1078-during-wizard-and-add-a-child-you-set-a-colour-for
branch
October 15, 2026 20:21
Merged
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.
Fixes #1078
The setup wizard showed a colour picker for each child but never saved the choice, and the Children dialog had no colour field. The panel always coloured children by their position in the list, using a different palette from the one the wizard showed.
Changes
Child.color—"#rrggbb", or""for the automatic colour. Children saved before this read as"", so nothing changes for them.add_child,update_childandsetup_wizard/applyonly accept a#rrggbbhex value (saved lowercase) or empty. Strict, because the panel puts it into astyleattribute._childColor()uses the stored colour and falls back to the old palette. It now also colours the avatar on the Children tab, so a new pick is visible straight away.Out of scope: Lovelace cards still use their own
header_coloroption.Testing
tests/test_child_color.py: model round-trip, validator (accepts / lowercases / rejects#fff,red, style injection), wizard save, add, update, and clear. Full suite: 3256 passed. Ruff, ESLint, translation and data-file checks all pass.invalid_formatrejection, that the colour is kept when other fields are saved, and clearing. Asetup_wizard/applyprobe confirmed the wizard's colour is stored (probe child removed afterwards).