Declined
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.
Comments
Similar requests
Function for checking broken references in automations
0 votes · 0 comments
Nest camera.snapshot returns placeholder image instead of real frame for WebRTC-only devices
3 votes · 0 comments
Get/Set Cover Position for automations
0 votes · 0 comments
SmartThings: expose dryer water tank / drain warning as entity or event
0 votes · 0 comments
Jinja2 relative_time does not translate
0 votes · 0 comments
No comments yet.