Skip to content

v1.11.0 — Per-Event Attributes in image_template

Choose a tag to compare

@KadenThomp36 KadenThomp36 released this 28 Apr 23:17

Bug Fix

  • image_template now uses per-state-change attributes. Previously, the history adapter prioritized hass.states[entityId].attributes (live, current) over the per-entry attributes returned by HA's history API. Since live state is virtually always populated, every historical event ended up rendering its template with the current attribute values rather than the snapshot recorded at that state change — making {{ attributes.foo }} resolve identically across all events.

    The adapter already omits minimal_response from the history API request when image_template is configured (so per-entry attributes are available); they just weren't being used. Order is now currState.attributes ?? liveEntity?.attributes ?? {}, so each event renders with its own attribute snapshot.

Behavior change

If you were relying on image_template rendering with the most recent live attribute values rather than the per-event snapshot, you'll see different output now. The new behavior matches what the documentation has always promised.