FeatureFuel
0

Automation variables: block silently downcasts unrepresentable values (e.g. lists of state objects) to str with no signal — corrupts downstream list operations

Source: home-assistant/core#177675 · opened by @folotp
The problem An automation variables: block silently corrupts any list of TemplateState objects the moment a later, separate variables: key reads it by name — even for the most trivial possible use (| count, no filtering). Scalars and lists of plain strings cross the same key boundary correctly. Elements stop being state objects (x[0] is string → True) and the count is wildly inflated (e.g. 852 real sensor.* entities → 231,736 after crossing one key boundary). Downstream code that does a bare attribute access (.last_changed, .entity_id) on the corrupted list throws UndefinedError: 'str object' has no attribute '...'. selectattr-based access on the corrupted list does not raise — it silently evaluates every comparison as False/Undefined, so the failure mode ranges from a loud traceback to a silent wrong-answer depending on how the value is consumed downstream. This is not a template design issue: the identical selectattr chain, evaluated self-contained inside a sin…

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests