#I meant sth like
1 messages · Page 1 of 1 (latest)
ok... but doesn't that code work already as it is?
expand() returns entire state objects after all
not sure what u are trying to accomplish
It does. I only hoped that it could be shortened more with the new possibilities.
it should reduce the need for {% fors %} in some user cases but otherwise it's nothing new to be excited about.
No new functionality was added.
Just some global functions were specifically marked to be used as test/filters.
Ah, too bad. I guess I had the wrong idea about it when I came across Petro's PR:
https://github.com/home-assistant/core/pull/79473
you can now write code like
{{ ['sensor.a', 'sensor.b'] | map('states') | list }}
or
{{ ['sensor.a', 'sensor.b'] | map('state_attr', 'friendly_name') | list }}
Pedro was just missuing expand() hacky was as a shorthand to accomplish that without loops
thou exapnd() is documented to be used on group entities
That PR is fullfiled... I was just confused you mentioned expand() function for some reason and why it came into picture
Many thanks for the clarification!