You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show a child's photo from their person entity - #1062
Lets a child's face come from a Home Assistant person (or any entity with a picture) instead of an MDI icon. A new optional per-child picture_entity is read on every update and exposed as avatar_image; a shared __taskmate_child_visual helper makes every card prefer the photo and fall back to the existing MDI avatar, so nothing changes for children without one. The child dialog gets a "Photo from" picker. The picture is not stored, so a photo changed under Settings › People shows up without re-saving anything, and the sensors refresh as soon as the entity's picture changes (not on every home/away flip).
This is the photo part of #913, split out as you offered.
Related issue
N/A — split out of #913. Also covers Copilot's finding there that cached avatar images ignored picture entity updates.
Type of change
Bug fix (non-breaking change that fixes an issue)
New feature (non-breaking change that adds functionality)
Breaking change (fix or feature that changes existing behaviour)
Documentation only
CI / tooling / chore
How has this been tested?
Ran ruff check . locally (matches the Ruff CI check)
Ran pytest locally (matches the Run tests CI check)
Exercised the change on a live Home Assistant instance
For card changes: hard-refreshed the browser and checked the console for errors
ruff format --check and ruff check clean; pytest 3149 passed; npm test 637 passed; check_translations.py and check_data_files.py pass. New tests in tests/test_child_picture_entity.py, including six for the photo refresh that fail without the fix.
Live: running on my own HA (2026.9) for two children linked to their person entities; both photos show on the cards and in the sensors, and a child with no picture entity keeps the MDI avatar. That instance runs this change on top of 6.1.0; the branch here is rebased on current main.
Checklist
My code follows the existing patterns in the codebase
I bumped manifest.jsonversion if this is a release-bound change
Any new user-facing strings are translated into all locales
(da, de, fr, nb, nn, pl, pt, pt-BR) in this same PR — not English-only
I updated the README / docs where relevant
I did not add Claude / AI co-author attribution to commits or files
Adds an optional per-child picture entity (normally the child's person.*).
Its picture is read on every update and exposed as avatar_image, and a
shared __taskmate_child_visual helper makes every card prefer the photo
and fall back to the MDI avatar. The panel's child dialog gets a
"Photo from" picker.
A child's photo is read from their picture entity, but the sensors' shared
context was cached per coordinator update, so a photo changed on the person
entity stayed stale until the next TaskMate refresh. Track each child's
picture entity and refresh the sensors when its picture really changes, and
make the shared cache aware of external entity changes.
Addresses the Copilot review on tempus2016#1062:
- The chore board, kiosk and recap cards now draw a child through the
shared face helper, so a child's photo shows there too and a child
without one keeps their avatar. (The badges card has no per-child avatar
to draw: its sensor sends none, so it always shows the generic icon.)
- The set of tracked picture entities trims each id the same way the photo
lookup reads it, so a stray space can't leave a photo untracked.
Use configured photos in bounty and auction card avatars
custom_components/taskmate/sensor.py:227
The overview now exposes the photo, but two existing face renderers still ignore it: taskmate-bounty-card.js:173-178 and taskmate-auction-card.js:181-186 resolve the same children rows and always render initials. Consequently configured photos do not appear on those cards, contrary to the PR's “every card” behavior. Route both _avatar methods through __taskmate_child_visual while preserving initials as the fallback.
This issue also appears on line 1589 of the same file.
Use configured photos for joined children in team progress
This updates the child's primary avatar, but _renderTeamProgress in the same card still reads kid.avatar directly at lines 2568-2572. Joined children therefore keep showing their MDI icon/initial even when avatar_image is present. Use __taskmate_child_visual(kid) in that renderer as well so all child faces in this card follow the new precedence.
Addresses the second Copilot review on tempus2016#1062: the bounty board and auction
cards drew every child as an initial, and the child card's teamwork row
read the avatar directly. All three now use the shared face helper, so a
child's photo shows there; the bounty and auction cards keep the initial
for a child without one.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The badges card still ignores configured child photos, contradicting the stated all-card behavior.
0 open findings
Previously missed (1)
In code that hasn't changed since last review
Use resolved avatar image in badges card
custom_components/taskmate/sensor.py:150
The photo data only reaches overview-backed and points/stats views; the badges card still renders attrs.child_avatar directly and ignores avatar_image. A configured child photo therefore never appears on taskmate-badges-card, despite the PR's “every card” behavior. Please expose the resolved image on ChildBadgesSensor and render that header through __taskmate_child_visual as well.
…ty with a picture
Addresses the third Copilot review on tempus2016#1062:
- The badges sensor now says whose badges they are (child_name,
child_avatar, avatar_image), and the card draws that face through the
shared helper. Before, the sensor sent neither, so the card always
showed a generic icon.
- "Photo from" lists any entity that has a picture (person, image,
camera...) instead of person entities only, matching what the backend
accepts.
TaskMate's child sensors show the photo chosen for the child, so picking
one as the source made the face refer to itself and go stale. The picker
no longer lists them and the backend ignores one if it was already saved.
The hint now says any entity with a picture can be used, the child's
person being the usual choice.
Thanks for turning these round so quickly. The badges card photo, the wider picker and leaving out TaskMate's own child sensors all look good, and CI is green.
One thing left before I can merge: the picker hint (panel.child_picture_entity_hint) changed meaning in en.json (it now says any entity with a picture), but the other locales still say "pick the child's person". That covers da, de, en-GB, fr, nb, nn, pl, pt and pt-BR. The translation parity check only compares keys, so it doesn't flag this. Could you bring those in line with the new English wording? Once that's in, I'll test it on my dev instance and merge.
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
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.
Summary
Lets a child's face come from a Home Assistant person (or any entity with a picture) instead of an MDI icon. A new optional per-child
picture_entityis read on every update and exposed asavatar_image; a shared__taskmate_child_visualhelper makes every card prefer the photo and fall back to the existing MDI avatar, so nothing changes for children without one. The child dialog gets a "Photo from" picker. The picture is not stored, so a photo changed under Settings › People shows up without re-saving anything, and the sensors refresh as soon as the entity's picture changes (not on every home/away flip).This is the photo part of #913, split out as you offered.
Related issue
N/A — split out of #913. Also covers Copilot's finding there that cached avatar images ignored picture entity updates.
Type of change
How has this been tested?
ruff check .locally (matches theRuffCI check)pytestlocally (matches theRun testsCI check)ruff format --checkandruff checkclean; pytest 3149 passed;npm test637 passed;check_translations.pyandcheck_data_files.pypass. New tests intests/test_child_picture_entity.py, including six for the photo refresh that fail without the fix.Live: running on my own HA (2026.9) for two children linked to their person entities; both photos show on the cards and in the sensors, and a child with no picture entity keeps the MDI avatar. That instance runs this change on top of 6.1.0; the branch here is rebased on current main.
Checklist
manifest.jsonversionif this is a release-bound change(
da,de,fr,nb,nn,pl,pt,pt-BR) in this same PR — not English-onlyREADME/ docs where relevantVersion left for you to set at release.