v1.11.2 — Null-Safe image_template Batch Rendering
Bug Fix
-
Fixed
image_templatebatch crashing when any event's template resolved to None. HA'srender_templateWebSocket API resolves withnullwhen a template evaluates toNone(e.g.{{ attributes.aircraft_photo }}where the attribute is missing or empty). The batch resolver called.trim()directly on each fulfilled result, so a singlenullvalue threwTypeError: can't access property "trim", e.value is nulland bubbled into the chunk'sPromise.allSettledfailure path — preventing every event in that batch from getting itsmediaUrl, even ones whose templates resolved to valid URLs.The check is now
r.status === 'fulfilled' && r.value ? r.value.trim() : '', so null results are treated as empty (no image) and the batch continues.
Symptom this fixes
Console error in production:
[chronicle-card] Template resolution failed: TypeError: can't access property "trim", e.value is null
…with no images rendering for any event in the affected source, even ones with valid attributes.